Skip to content

krzysztofzylka/strings

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Install

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')