Skip to content

Commit c6efbff

Browse files
committed
Updated README.md
1 parent ae6b323 commit c6efbff

File tree

1 file changed

+45
-41
lines changed

1 file changed

+45
-41
lines changed

README.md

Lines changed: 45 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,12 @@
22

33
# Zig String (A UTF-8 String Library)
44

5-
This library is a UTF-8 compatible **string** library for the **Zig** programming language.
5+
This library is a UTF-8 compatible **string** library for the **Zig** programming language.
66
I made this for the sole purpose to further my experience and understanding of zig.
77
Also it may be useful for some people who need it (including myself), with future projects. Project is also open for people to add to and improve. Please check the **issues** to view requested features.
88

99
# Basic Usage
10+
1011
```zig
1112
const String = @import("./zig-string.zig").String;
1213
// ...
@@ -30,6 +31,7 @@ assert(myString.cmp("🔥 Hello, World 🔥"));
3031
```
3132

3233
# Installation
34+
3335
Add this to your build.zig.zon
3436

3537
```zig
@@ -59,14 +61,15 @@ You can then import the library into your code like this
5961
const String = @import("string").String;
6062
```
6163

62-
6364
# Things needed
65+
6466
- Optimizations
6567
- Multi-Language toUppercase & toLowercase
6668
- Better documentation
6769
- More Testing
6870

6971
# How to Contribute
72+
7073
1. Fork
7174
2. Clone
7275
3. Add Features (Use Zig FMT)
@@ -75,45 +78,46 @@ const String = @import("string").String;
7578
6. Success!
7679

7780
# Working Features
81+
7882
If there are any issues with <b>complexity</b> please <b>open an issue</b>
7983
(I'm no expert when it comes to complexity)
8084

81-
Function | Description
82-
--------------|------------------------------------------
83-
allocate | Sets the internal buffer size
84-
capacity | Returns the capacity of the String
85-
charAt | Returns character at index
86-
clear | Clears the contents of the String
87-
clone | Copies this string to a new one
88-
cmp | Compares to string literal
89-
concat | Appends a string literal to the end
90-
deinit | De-allocates the String
91-
find | Finds first string literal appearance
92-
rfind | Finds last string literal appearance
93-
init | Creates a String with an Allocator
94-
init_with_contents| Creates a String with specified contents
95-
insert | Inserts a character at an index
96-
isEmpty | Checks if length is zero
97-
iterator | Returns a StringIterator over the String
98-
len | Returns count of characters stored
99-
pop | Removes the last character
100-
remove | Removes a character at an index
101-
removeRange | Removes a range of characters
102-
repeat | Repeats string n times
103-
reverse | Reverses all the characters
104-
split | Returns a slice based on delimiters
105-
splitToString | Returns a String based on delimiters
106-
str | Returns the String as a slice
107-
substr | Creates a string from a range
108-
toLowercase | Converts (ASCII) characters to lowercase
109-
toOwned | Creates an owned slice of the String
110-
toUppercase | Converts (ASCII) characters to uppercase
111-
trim | Removes whitelist from both ends
112-
trimEnd | Remove whitelist from the end
113-
trimStart | Remove whitelist from the start
114-
truncate | Realloc to the length
115-
set_str | Set's buffer value from string literal
116-
writer | Returns a std.io.Writer for the String
117-
starts_with | Determines if the given string begins with the given value
118-
ends_with | Determines if the given string ends with the given value
119-
replace | Replace all occurrences of the search string with the replacement string
85+
| Function | Description |
86+
| ------------------ | ------------------------------------------------------------------------ |
87+
| allocate | Sets the internal buffer size |
88+
| capacity | Returns the capacity of the String |
89+
| charAt | Returns character at index |
90+
| clear | Clears the contents of the String |
91+
| clone | Copies this string to a new one |
92+
| cmp | Compares to string literal |
93+
| concat | Appends a string literal to the end |
94+
| deinit | De-allocates the String |
95+
| find | Finds first string literal appearance |
96+
| rfind | Finds last string literal appearance |
97+
| init | Creates a String with an Allocator |
98+
| init_with_contents | Creates a String with specified contents |
99+
| insert | Inserts a character at an index |
100+
| isEmpty | Checks if length is zero |
101+
| iterator | Returns a StringIterator over the String |
102+
| len | Returns count of characters stored |
103+
| pop | Removes the last character |
104+
| remove | Removes a character at an index |
105+
| removeRange | Removes a range of characters |
106+
| repeat | Repeats string n times |
107+
| reverse | Reverses all the characters |
108+
| split | Returns a slice based on delimiters |
109+
| splitToString | Returns a String based on delimiters |
110+
| str | Returns the String as a slice |
111+
| substr | Creates a string from a range |
112+
| toLowercase | Converts (ASCII) characters to lowercase |
113+
| toOwned | Creates an owned slice of the String |
114+
| toUppercase | Converts (ASCII) characters to uppercase |
115+
| trim | Removes whitelist from both ends |
116+
| trimEnd | Remove whitelist from the end |
117+
| trimStart | Remove whitelist from the start |
118+
| truncate | Realloc to the length |
119+
| setStr | Set's buffer value from string literal |
120+
| writer | Returns a std.io.Writer for the String |
121+
| startsWith | Determines if the given string begins with the given value |
122+
| endsWith | Determines if the given string ends with the given value |
123+
| replace | Replace all occurrences of the search string with the replacement string |

0 commit comments

Comments
 (0)