Logo

Programming-Idioms

History of Idiom 46 > diff from v4 to v5

Edit summary for version 5 by :

Version 4

2015-08-20, 10:23:12

Version 5

2015-08-20, 10:23:43

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
let t=s[..5].to_string();