Skip to content

Commit 8af5303

Browse files
committed
Add Noname\Common\Str to README.md
1 parent 447b86d commit 8af5303

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ Use Composer to install `php7-common` into your project.
1616

1717
* `Noname\Common\Arr`
1818
* `Noname\Common\Collection`
19+
* `Noname\Common\Str`
1920
* `Noname\Common\Validator`
2021

2122
### `\Noname\Common\Arr`
@@ -147,6 +148,24 @@ Returns collection as JSON.
147148

148149
Flatten all of the items in the collection using dot (.) notation.
149150

151+
### `\Noname\Common\Str`
152+
153+
A helper library for working with strings.
154+
155+
#### Str Methods
156+
157+
##### `static startsWith(string $string, string $prefix, bool $caseSensitive = true) : bool`
158+
159+
Checks if string starts with given prefix. By default this method is case-sensitive.
160+
161+
##### `static endsWith(string $string, string $suffix, bool $caseSensitive = true) : bool`
162+
163+
Checks if string ends with given prefix. By default this method is case-sensitive.
164+
165+
##### `static equals(string $a, string $b, bool $caseSensitive = true) : bool`
166+
167+
Checks if two strings equal each other. By default this method is case-sensitive.
168+
150169
### \Noname\Common\Validator
151170

152171
Use `Validator` to validate your data based on a set of rules.

0 commit comments

Comments
 (0)