c# - String.Trim() removes more than need? -
i found ticket in our issue tracker 1 of customers report bug 1 texts incomplete! have text conversion program 1 legacy system(ibm as400) modern one. tracked , found unknown behavior on code!!
first see this: 
as see, there 2 char before first space (char32), when remove trim(),the result is:

yes, trim() removes char160 beginning! happened trim() works more need? note: both pictures captured in same test state.
160 nbsp (non-breaking space) , according documentation, trim remove whitespace. 160 classified in unicode whitespace.
you might want call trim(' ') instead.
Comments
Post a Comment