Logo

Programming-Idioms

History of Idiom 46 > diff from v1 to v2

Edit summary for version 2 by :

Version 1

2015-05-06, 21:04:50

Version 2

2015-07-31, 19:35:19

Idiom #46 Extract beginning of string (prefix)

Create string t consisting in the 5 first characters of string s.

Idiom #46 Extract beginning of string (prefix)

Create string t consisting in the 5 first characters of string s.

Code
$t = substr($s, 0, 5);