Метод | Описание | |
---|---|---|
contains ( string | array $needle, string $haystack, boolean $strict = false ) : boolean | Check whether a char or word exists in a string or not. | |
replaceFirst ( string $search, string $replace, string $subject ) : mixed | Replace only the first occurance found inside the string. | |
typeCast ( mixed $string ) : mixed | TypeCast a string to its specific types. |
public static contains ( string | array $needle, string $haystack, boolean $strict = false ) : boolean | ||
$needle | string | array | The char or word to find in the $haystack. Can be an array to multi find words or char in the string. |
$haystack | string | The haystack where the $needle string should be looked up. |
$strict | boolean | If an array of needles is provided the $strict parameter defines whether all keys must be found ($strict = true) or just one result must be found ($strict = false). |
Результат | boolean | If an array of values is provided the response may change depending on $findAll |
public static replaceFirst ( string $search, string $replace, string $subject ) : mixed | ||
$search | string | Search string to look for. |
$replace | string | Replacement value for the first found occurrence. |
$subject | string | The string you want to look up to replace the first element. |
Результат | mixed | Replaced string |