returns true if $string begins with $begin, return false otherwise
($string, $begin)
| 44 | |
| 45 | /// returns true if $string begins with $begin, return false otherwise |
| 46 | function beginsWith($string, $begin) { |
| 47 | if(substr($string, 0, strlen($begin)) == $begin) |
| 48 | { |
| 49 | return true; |
| 50 | } |
| 51 | return false; |
| 52 | } |
| 53 | |
| 54 | /// returns true if $string ends with $end, return false otherwise |
| 55 | function endsWith($string, $end) { |
no test coverage detected