Changeset 2286
- Timestamp:
- 03/11/2008 01:53:11 PM (9 months ago)
- Files:
-
- 1 modified
-
trunk/system/helpers/text.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/system/helpers/text.php
r2220 r2286 25 25 $end_char = ($end_char === NULL) ? '…' : $end_char; 26 26 27 if (trim($str) == '')27 if (trim($str) === '') 28 28 return $str; 29 29 … … 35 35 // Only attach the end character if the matched string is shorter 36 36 // than the starting string. 37 return rtrim($matches[0]).(strlen($matches[0]) == strlen($str) ? '' : $end_char);37 return rtrim($matches[0]).(strlen($matches[0]) === strlen($str) ? '' : $end_char); 38 38 } 39 39 … … 53 53 $limit = (int) $limit; 54 54 55 if (trim($str) == '' OR utf8::strlen($str) <= $limit)55 if (trim($str) === '' OR utf8::strlen($str) <= $limit) 56 56 return $str; 57 57 … … 79 79 static $i; 80 80 81 if (func_num_args() == 0)81 if (func_num_args() === 0) 82 82 { 83 83 $i = 0;
