Logo

Programming-Idioms

History of Idiom 46 > diff from v7 to v8

Edit summary for version 8 by :

Version 7

2015-08-21, 23:21:57

Version 8

2015-08-21, 23:22:26

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
var t = s.substring(0, 5);
Code
var t = s.substring(0, 5);
Doc URL
https://api.dartlang.org/apidocs/channels/stable/dartdoc-viewer/dart-core.String#id_substring
Origin
https://api.dartlang.org/apidocs/channels/stable/dartdoc-viewer/dart-core.String#id_substring