Logo

Programming-Idioms

History of Idiom 97 > diff from v8 to v9

Edit summary for version 9 by :
New D implementation by user [piou]

Version 8

2015-10-31, 15:37:21

Version 9

2015-11-03, 23:48:45

Idiom #97 Check string suffix

Set boolean b to true if string s ends with suffix suffix, false otherwise.

Idiom #97 Check string suffix

Set boolean b to true if string s ends with suffix suffix, false otherwise.

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