Skip to content

Commit 4f8b42b

Browse files
committed
Update usage
1 parent 2c2cd6e commit 4f8b42b

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

README.md

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,22 @@ This yocLibrary enables your project to encode and decode Netstring values in PH
1212

1313
## Use
1414

15-
### Serialization
15+
### Encoding
1616

1717
```php
18-
//TODO
18+
use YOCLIB\Netstring\Netstring;
19+
20+
$string = 'abc';
21+
22+
$netstring = Netstring::encode($string);
1923
```
2024

21-
### Deserialization
25+
### Decoding
2226

2327
```php
24-
//TODO
28+
use YOCLIB\Netstring\Netstring;
29+
30+
$netstring = '3:abc,';
31+
32+
$string = Netstring::decode($netstring);
2533
```

0 commit comments

Comments
 (0)