/ Published in: PHP
Similar to python string.endswith
Expand |
Embed | Plain Text
/** * return bool ** / function endswith($char, $string) { return (substr($string, strlen($char) * -1) == $char ) ? true : false; }
Comments
Subscribe to comments
You need to login to post a comment.

return 0 === strpos( strrev( $string ), strrev( $char ) );