@@ -30,59 +30,6 @@ To install `bin-encode-decode` run cmd:
3030cargo add bin-encode-decode
3131```
3232
33- ## Usage
34-
35- ### encode
36-
37- #### Use Struct
38-
39- ``` rust
40- use bin_encode_decode :: * ;
41-
42- let mut en_decode : Charset <'_ > = Charset :: new ();
43- let test_str : & str = " test" ;
44- let mut charset : String = String :: from (" abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_=" );
45- en_decode . charset (& charset );
46- let encode : Result <String , EncodeError > = en_decode . encode (test_str );
47- ```
48-
49- #### Use Function
50-
51- ``` rust
52- use bin_encode_decode :: * ;
53-
54- let test_str : & str = " test" ;
55- let mut charset : String = String :: from (" abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_=" );
56- let encode : Result <String , EncodeError > = Encode :: execute (& charset , test_str );
57- ```
58-
59- ### decode
60-
61- #### Use Struct
62-
63- ``` rust
64- use bin_encode_decode :: * ;
65-
66- let mut en_decode : Charset <'_ > = Charset :: new ();
67- let test_str : & str = " aab0aabLaabZaab0" ;
68- let mut charset : String = String :: from (" abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_=" );
69- en_decode . charset (& charset );
70- let decode : Result <String , DecodeError > = en_decode . decode (test_str );
71- ```
72-
73- #### Use Function
74-
75- ``` rust
76- use bin_encode_decode :: * ;
77-
78- let charset = " abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_=" ;
79- let encoded_str = " aab0aabLaabZaab0" ;
80- let decoded_str = Decode :: execute (charset , encoded_str );
81- let charset = " abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_=" ;
82- let original_str = " test" ;
83- let encoded_str = Encode :: execute (charset , original_str );
84- ```
85-
8633## License
8734
8835This project is licensed under the MIT License. See the [ LICENSE] ( LICENSE ) file for details.
0 commit comments