Return to Snippet

Revision: 14251
at May 26, 2009 18:05 by iloveitaly


Initial Code
function startsWith($check, $string) {
    if ($check === "" || $check === $string) {
        return true;
    } else {
        return (strpos($string, $check) === 0) ? true : false;
    }
}

Initial URL


Initial Description


Initial Title
startsWith / hasPrefix

Initial Tags


Initial Language
PHP