Return to Snippet

Revision: 6020
at April 21, 2008 12:51 by stancell


Initial Code
function string_ends_with($string, $ending)
{
    $len = strlen($ending);
    $string_end = substr($string, strlen($string) - $len);
   
    return $string_end == $ending;
}

Initial URL

                                

Initial Description

                                

Initial Title
Check whether string ends with a given string

Initial Tags

                                

Initial Language
PHP