Logo

Programming-Idioms

History of Idiom 96 > diff from v7 to v8

Edit summary for version 8 by :

Version 7

2015-10-25, 18:56:32

Version 8

2015-10-28, 01:49:00

Idiom #96 Check string prefix

Set boolean b to true if string s starts with prefix prefix, false otherwise.

Idiom #96 Check string prefix

Set boolean b to true if string s starts with prefix prefix, false otherwise.

Code
$b = $prefix eq substr($s,0,length($prefix));