Logo

Programming-Idioms

History of Idiom 38 > diff from v16 to v17

Edit summary for version 17 by :

Version 16

2015-08-25, 20:24:08

Version 17

2015-08-26, 21:10:39

Idiom #38 Extract a substring

Find substring t consisting in characters i (included) to j (excluded) of string s.
(character indexes start at 0 unless specified otherwise)

Idiom #38 Extract a substring

Find substring t consisting in characters i (included) to j (excluded) of string s.
(character indexes start at 0 unless specified otherwise)

Code
$t = mb_substr($s, $i, $j-$i, 'UTF-8');
Code
$t = mb_substr($s, $i, $j-$i, 'UTF-8');
Comments bubble
/* requires multibyte (mb) extension for unicode support */
Comments bubble
Requires multibyte (mb) extension for unicode support.