Class string
A utility class for performing operations on strings.
Methods summary
public static
string
|
#
truncate( string $phrase, integer $num_words, string $read_more = '..' )
Returns the first X words from the given string, based on: |
public static
boolean
|
#
contains( string $haystack, string $needle )
Shortcut to determine whether one string is found within another. |
public static
boolean
|
#
starts_with( type $haystack, type $needle )
Shortcut to determine whether one string starts with another. |
public static
boolean
|
#
ends_with( type $haystack, type $needle )
Shortcut to determine whether one string ends with another. |
public static
string
|
|
public static
If
|
#
trim_start( type $haystack, type $needle )
Trims the beginning of a string of a given string. The start of the haystack must be an exact match of the needle for this to work. |