Hi i have strange problem. Here is my code:
string tmp = "20_29\u0013"; How can I get rid of that "\u0013"?
Normally I will do it with substring or something but I have some issues with that character ---> \
Could someone help me?
You can use tmp.TrimEnd('\u0013') if it is single char or tmp.Replace("\\u0013", string.Empty) if it is sequence of chars to get "20_29" part:
\rTrimEnd
\u0013is an escape sequence representing the carriage return charactertmp = tmp.Replace("\u0013", "");where"\u0013"is in fact a single character with0x0013code:'\r'. Another possibility istmp = tmp.TrimEnd();which removes white spaces ('\r'included) from the end of the string`,u,0,0,1,3` ? Or a single0x13byte? This escape sequence is a carriage return, also represented as\r. In all single-byte code pages and UTF8 it's represented by a single byte,0x13. You can remove it from the end of any string withStrings.TrimEnd('\r', '\n');