Lines Matching defs:str
74 * @param string $str
82 public static function substr($str, $offset, $length = null)
86 return mb_substr($str, $offset);
89 return mb_substr($str, $offset, $length);
107 $str = (string)$str; // generates E_NOTICE for PHP4 objects, but not PHP5 objects
120 $strlen = self::strlen($str); // see notes
140 if (!isset($strlen)) $strlen = self::strlen($str); // see notes
162 if (!preg_match('#' . $offset_pattern . $length_pattern . '#us', $str, $match)) return '';
194 * @param string $str
201 public static function ltrim($str, $charlist = '')
203 if ($charlist === '') return ltrim($str);
208 return preg_replace('/^[' . $charlist . ']+/u', '', $str);
214 * @param string $str
221 public static function rtrim($str, $charlist = '')
223 if ($charlist === '') return rtrim($str);
228 return preg_replace('/[' . $charlist . ']+$/u', '', $str);
234 * @param string $str
241 public static function trim($str, $charlist = '')
243 if ($charlist === '') return trim($str);
245 return self::ltrim(self::rtrim($str, $charlist), $charlist);
296 * @param string $str
301 public static function ucfirst($str)
303 switch (self::strlen($str)) {
307 return self::strtoupper($str);
309 preg_match('/^(.{1})(.*)$/us', $str, $matches);
318 * @param string $str
324 public static function ucwords($str)
339 $str