StringTrim
StringTrim(s)
returns a version of
s
with whitespace removed from start and end.
StringTrim(s, patt)
returns a version of
s
with strings matchingpatt
removed from start and end.
Examples
>> StringJoin("a", StringTrim(" \\tb\\n "), "c")abc
>> StringTrim("ababaxababyaabab", RegularExpression("(ab)+"))axababya
Related terms
StringCases, StringContainsQ, StringCount, StringExpression, StringFreeQ, StringInsert, StringJoin, StringLength, StringMatchQ, StringPart, StringPosition, StringQ, StringReplace, StringRiffle, StringSplit, StringTake, StringToByteArray
Implementation status
- ✅ - full supported