[PHP] String start with string

if string start with string

[code lang=”php” autolinks=”false” collapse=”false” firstline=”1″ gutter=”true” htmlscript=”false” light=”false” padlinenumbers=”false” smarttabs=”true” tabsize=”4″ toolbar=”false”]function strstart($string, $search) {
return (strncmp($string, $search, strlen($search)) == 0);
}[/code]

rif: albertopasca.it

 

Alberto Pasca

Software engineer @ Pirelli & C. S.p.A. with a strong passion for mobile  development, security, and connected things.