ustring
ustring copied to clipboard
provide a definition of whitespace for trim()
which characters will trim() trim?
whitespace is very subjective and different in every language, including unicode
i would use C#'s whitespace definition as default (https://msdn.microsoft.com/en-us/library/t809ektx(v=vs.110).aspx) plus the null byte as in php's trim() but i would also add an optional parameter "$charset" so that the behavior would be completely customizable
UString::trim(UString $charset = null)
We're using ICU's UnicodeString to implement UString, but it doesn't seem to specify what 'whitespace' is: http://icu-project.org/apiref/icu4c/classicu_1_1UnicodeString.html#a3ede7f2dfe35b1afcce8d9ba20dbc83b