Posted By

stancell on 04/21/08


Tagged

String begins starts


Versions (?)

Check whether string begins with given string


 / Published in: PHP
 

  1. function string_begins_with($string, $search)
  2. {
  3. return (strncmp($string, $search, strlen($search)) == 0);
  4. }
  5.  
  6. .

Report this snippet  

You need to login to post a comment.