public Utf8String TrimEnd() { CodePointReverseEnumerator it = CodePoints.GetReverseEnumerator(); while (it.MoveNext() && UnicodeCodePoint.IsWhitespace(it.Current)) { } return(Substring(0, it.PositionInCodeUnits)); }
public Utf8String TrimStart() { CodePointEnumerator it = GetCodePointEnumerator(); while (it.MoveNext() && UnicodeCodePoint.IsWhitespace(it.Current)) { } return(Substring(it.PositionInCodeUnits)); }