returns true if $string ends with $end, return false otherwise
($string, $end)
| 53 | |
| 54 | /// returns true if $string ends with $end, return false otherwise |
| 55 | function endsWith($string, $end) { |
| 56 | if(substr($string,-1*strlen($end)) == $end) |
| 57 | { |
| 58 | return true; |
| 59 | } |
| 60 | return false; |
| 61 | } |
| 62 | |
| 63 | /// returns the prefix of length $length of string $string |
| 64 | function prefix($string, $length) { |