Logo

Programming-Idioms

History of Idiom 96 > diff from v12 to v13

Edit summary for version 13 by :

Version 12

2015-11-03, 23:47:19

Version 13

2015-11-30, 12:37:31

Idiom #96 Check string prefix

Set boolean b to true if string s starts with prefix prefix, false otherwise.

Idiom #96 Check string prefix

Set boolean b to true if string s starts with prefix prefix, false otherwise.

Imports
import std.algorithm.searching;
Imports
import std.algorithm.searching;
Code
b = s.startsWith(prefix);
Code
b = s.startsWith(prefix);
Doc URL
http://dlang.org/phobos/std_algorithm_searching.html#.startsWith
Doc URL
http://dlang.org/phobos/std_algorithm_searching.html#.startsWith