krzysztofzylka / strings
String library
Installs: 627
Dependents: 2
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/krzysztofzylka/strings
Requires
- php: >=7.4
README
composer require krzysztofzylka/strings
Methods
Escape string
\Krzysztofzylka\Strings\Strings::escape('string')
Undo escape string
\Krzysztofzylka\Strings\Strings::undoEscape('escaped string')
Lowercase and clean string
\Krzysztofzylka\Strings\Strings::lowerCleanString('string')
Cleans the given string by removing all non-alphanumeric characters and replacing spaces with dashes.
\Krzysztofzylka\Strings\Strings::clean('string')
Get first x words
\Krzysztofzylka\Strings\Strings::substrWithoutLastWord('word1 word2 word3', 10)
Remove line breaks
\Krzysztofzylka\Strings\Strings::removeLineBreaks('string')
Camelize
\Krzysztofzylka\Strings\Strings::camelizeString('string')
Decamelize
\Krzysztofzylka\Strings\Strings::decamelizeString('string')