trimEnd

fnIStr trimEnd(IStr str, IStr pattern = "") @safe nothrow @nogc

Removes whitespace characters from the end of the string. Value pattern can be used to trim a specific pattern from the end (e.g. ".txt") instead of whitespace.

fnIStr trimEnd(IStr str, char pattern) @safe nothrow @nogc

Removes whitespace characters from the end of the string. Value pattern can be used to trim a specific pattern from the end (e.g. ".txt") instead of whitespace.