Lines Matching refs:string
25 static function truncateString($myString, $length): string
40 public static function normalized($string) argument
42 return str_replace("\n", "", $string);
72 $string = var_export($value, true);
75 $lastCharacterIndex = strlen($string) - 1;
76 if ($string[0] === "'" && $string[$lastCharacterIndex] === "'") {
77 $string = substr($string, 1, strlen($string) - 2);
79 return $string;
98 $string = var_export($value, true);
99 …LogUtility::msg("The type of the value ($string) is unknown and could not be properly cast to stri…
100 return $string;
125 public static function rtrim(&$doc, $string) argument
132 $string = trim($string);
133 $length = strlen($doc) - strlen($string);
134 if (substr($doc, $length) === $string) {
146 public static function ltrim(&$doc, $string) argument
150 $string = trim($string);
151 $length = strlen($string);
152 if (substr($doc, 0, $length) === $string) {
223 public static function endWiths($string, $suffix) argument
225 $suffixStartPosition = strlen($string) - strlen($suffix);
226 return strrpos($string, $suffix) === $suffixStartPosition;
229 public static function explodeAndTrim($string, $delimiter = ",") argument
231 return array_map('trim', explode($delimiter, $string));
243 public static function startWiths($string, $prefix) argument
245 return strrpos($string, $prefix) === 0;
253 public static function getWords($string, $separatorsCharacters = null): array argument
264 $string = str_replace($separatorsCharacters, " ", $string);
266 $string = preg_replace("/\s{2,}/", " ", $string);
268 $string = trim($string);
270 return explode(" ", $string);