string or forward range of characters
input stripped of leading whitespace or characters specified in the second argument.
Postconditions: input and the returned value will share the same tail (see std.array.sameTail).
import std.uni : lineSep, paraSep; assert(stripLeft(" hello world ") == "hello world "); assert(stripLeft("\n\t\v\rhello world\n\t\v\r") == "hello world\n\t\v\r"); assert(stripLeft(" \u2028hello world") == "hello world"); assert(stripLeft("hello world") == "hello world"); assert(stripLeft([lineSep] ~ "hello world" ~ lineSep) == "hello world" ~ [lineSep]); assert(stripLeft([paraSep] ~ "hello world" ~ paraSep) == "hello world" ~ [paraSep]); import std.array : array; import std.utf : byChar; assert(stripLeft(" hello world "w.byChar).array == "hello world "); assert(stripLeft(" \u2022hello world ".byChar).array == "\u2022hello world ");
Generic stripping on ranges: std.algorithm.mutation._stripLeft
Strips leading whitespace (as defined by std.uni.isWhite) or as specified in the second argument.