Method |
Description |
|
clean ( string $string, boolean $toLower = false, boolean $addslashes = false ) : string |
Make string safe
- Remove UTF-8 chars
- Remove all tags
- Trim
- Addslashes (opt)
- To lower (opt) |
|
esc ( string $string ) : string |
Escape UTF-8 strings |
|
escXml ( $string ) : mixed |
Escape string before save it as xml content |
|
getClassName ( mixed $object, boolean $toLower = false ) : mixed | string |
Get class name without namespace |
|
htmlEnt ( string $string, boolean $encodedEntities = false ) : string |
Convert >, <, ', " and & to html entities, but preserves entities that are already encoded. |
|
inc ( string $string, string $style = 'default', integer $next ) : string |
Increments a trailing number in a string. |
|
ipos ( string $haystack, string $needle, integer $offset ) : integer |
Finds position of first occurrence of a string within another, case insensitive |
|
isEnd ( string $haystack, string $needle, boolean $caseSensitive = false ) : boolean |
Checks if the $haystack ends with the text in the $needle. Case sensitive. |
|
isMBString ( ) : boolean |
Check is mbstring loaded |
|
isOverload ( ) : integer |
Check is mbstring oeverload standard functions |
|
isStart ( string $haystack, string $needle, boolean $caseSensitive = false ) : boolean |
Checks if the $haystack starts with the text in the $needle. |
|
istr ( string $haystack, string $needle, boolean $beforeNeedle = false ) : string |
Finds first occurrence of a string within another, case insensitive |
|
len ( $string ) : integer |
Get string length |
|
like ( string $pattern, string $string, boolean $caseSensitive = true ) : boolean |
Check if a given string matches a given pattern. |
|
limitChars ( string $string, integer $limit = 100, string $append = '...' ) : string |
Truncate the string to given length of characters. |
|
limitWords ( string $string, integer $limit = 100, string $append = '...' ) : string |
Truncate the string to given length of words. |
|
low ( string $string ) : string |
Make a string lowercase |
|
parseLines ( string $text, boolean $toAssoc = true ) : array |
Parse text by lines |
|
pos ( string $haystack, string $needle, integer $offset ) : integer |
Find position of first occurrence of string in a string |
|
random ( integer $length = 10, boolean $isReadable = true ) : string |
Generate ridable random string |
|
rchr ( string $haystack, string $needle, boolean $part = null ) : string |
Finds the last occurrence of a character in a string within another |
|
rpos ( string $haystack, string $needle, integer $offset ) : integer |
Find position of last occurrence of a string in a string |
|
slug ( string $text = '', boolean $isCache = false ) : string |
Converts any accent characters to their equivalent normal characters |
|
splitCamelCase ( string $input, string $separator = '_', boolean $toLower = true ) : string |
Convert camel case to human readable format |
|
splitSql ( string $sql ) : array |
Splits a string of multiple queries into an array of individual queries. |
|
stripSpace ( string $string ) : string |
Strip all witespaces from the given string. |
|
strstr ( string $haystack, string $needle, boolean $beforeNeedle = false ) : string |
Finds first occurrence of a string within another |
|
sub ( string $string, integer $start, integer $length ) : string |
Get part of string |
|
subCount ( string $haystack, string $needle ) : integer |
Count the number of substring occurrences |
|
testName2Human ( string $input ) : mixed | string |
Convert test name to human readable string |
|
trim ( string $value, boolean $extendMode = false ) : string |
Trim whitespaces and other special chars |
|
truncateSafe ( string $string, integer $length, string $append = '...' ) : string |
Truncate a string to a specified length without cutting a word off. |
|
unique ( string $prefix = 'unique' ) : string |
Get unique string |
|
up ( string $string ) : string |
Make a string uppercase |
|
uuid ( ) : string |
Generates a universally unique identifier (UUID v4) according to RFC 4122
Version 4 UUIDs are pseudo-random! |
|
zeroPad ( integer $number, integer $length ) : string |
Pads a given string with zeroes on the left. |
|