Check whether string begins with given string
1 2 function string_begins_with($string, $search) 3 { 4 return (strncmp($string, $search, strlen($search)) == 0); 5 }
13498 users tagging and storing useful source code snippets
Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world
1 2 function string_begins_with($string, $search) 3 { 4 return (strncmp($string, $search, strlen($search)) == 0); 5 }