Class StringUtil
Utility class for string manipulation.
Methods summary
public static
beginsWith( string $subject
, string $prefix
)
: boolean
Returns whether a given string is prefixed by another.
Returns whether a given string is prefixed by another.
Parameters
$subject
- The string to be tested
$prefix
- The prefix to be detected
Returns
boolean
public static
endsWith( string $subject
, string $suffix
)
: boolean
Returns whether a given string is suffixed by another.
Returns whether a given string is suffixed by another.
Parameters
$subject
- The string to be tested
$suffix
- The suffix to be detected
Returns
boolean
public static
contains( string $haystack
, string $needle
)
: boolean
Returns whether a given string contains another.
Returns whether a given string contains another.
Parameters
$haystack
- The string to be tested
$needle
- The substring to be detected
Returns
boolean