Logo

Programming-Idioms

History of Idiom 46 > diff from v2 to v3

Edit summary for version 3 by :

Version 2

2015-07-31, 19:35:19

Version 3

2015-08-19, 14:20:02

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 = mb_substr($s, 0, 5, 'UTF-8');