Lines Matching refs:text

24      * Returns TRUE if every character in text is either a letter or a digit, FALSE otherwise.
28 * @param mixed $text
32 public static function ctype_alnum($text)
34 $text = self::convert_int_to_char_for_ctype($text, __FUNCTION__);
36 return \is_string($text) && '' !== $text && !preg_match('/[^A-Za-z0-9]/', $text);
40 * Returns TRUE if every character in text is a letter, FALSE otherwise.
44 * @param mixed $text
48 public static function ctype_alpha($text)
50 $text = self::convert_int_to_char_for_ctype($text, __FUNCTION__);
52 return \is_string($text) && '' !== $text && !preg_match('/[^A-Za-z]/', $text);
56 * Returns TRUE if every character in text is a control character from the current locale, FALSE otherwise.
60 * @param mixed $text
64 public static function ctype_cntrl($text)
66 $text = self::convert_int_to_char_for_ctype($text, __FUNCTION__);
68 return \is_string($text) && '' !== $text && !preg_match('/[^\x00-\x1f\x7f]/', $text);
72 * Returns TRUE if every character in the string text is a decimal digit, FALSE otherwise.
76 * @param mixed $text
80 public static function ctype_digit($text)
82 $text = self::convert_int_to_char_for_ctype($text, __FUNCTION__);
84 return \is_string($text) && '' !== $text && !preg_match('/[^0-9]/', $text);
88 * Returns TRUE if every character in text is printable and actually creates visible output (no white space), FALSE otherwise.
92 * @param mixed $text
96 public static function ctype_graph($text)
98 $text = self::convert_int_to_char_for_ctype($text, __FUNCTION__);
100 return \is_string($text) && '' !== $text && !preg_match('/[^!-~]/', $text);
104 * Returns TRUE if every character in text is a lowercase letter.
108 * @param mixed $text
112 public static function ctype_lower($text)
114 $text = self::convert_int_to_char_for_ctype($text, __FUNCTION__);
116 return \is_string($text) && '' !== $text && !preg_match('/[^a-z]/', $text);
120 * Returns TRUE if every character in text will actually create output (including blanks). Returns FALSE if text contains control characters or characters that do not have any output or control function at all.
124 * @param mixed $text
128 public static function ctype_print($text)
130 $text = self::convert_int_to_char_for_ctype($text, __FUNCTION__);
132 return \is_string($text) && '' !== $text && !preg_match('/[^ -~]/', $text);
136 * Returns TRUE if every character in text is printable, but neither letter, digit or blank, FALSE otherwise.
140 * @param mixed $text
144 public static function ctype_punct($text)
146 $text = self::convert_int_to_char_for_ctype($text, __FUNCTION__);
148 return \is_string($text) && '' !== $text && !preg_match('/[^!-\/\:-@\[-`\{-~]/', $text);
152 * Returns TRUE if every character in text creates some sort of white space, FALSE otherwise. Besides the blank character this also includes tab, vertical tab, line feed, carriage return and form feed characters.
156 * @param mixed $text
160 public static function ctype_space($text)
162 $text = self::convert_int_to_char_for_ctype($text, __FUNCTION__);
164 return \is_string($text) && '' !== $text && !preg_match('/[^\s]/', $text);
168 * Returns TRUE if every character in text is an uppercase letter.
172 * @param mixed $text
176 public static function ctype_upper($text)
178 $text = self::convert_int_to_char_for_ctype($text, __FUNCTION__);
180 return \is_string($text) && '' !== $text && !preg_match('/[^A-Z]/', $text);
184 * Returns TRUE if every character in text is a hexadecimal 'digit', that is a decimal digit or a character from [A-Fa-f] , FALSE otherwise.
188 * @param mixed $text
192 public static function ctype_xdigit($text)
194 $text = self::convert_int_to_char_for_ctype($text, __FUNCTION__);
196 return \is_string($text) && '' !== $text && !preg_match('/[^A-Fa-f0-9]/', $text);