The String.Trim() provides two overloads to remove leading and
trailing spaces as well as to remove any unwanted character. Here's a
sample demonstrating the two overloads. Apart from trimming the
string, it also removes the "#" character.
str = " Some new string we test ##";
str1 = str.Trim().Trim(char.Parse("#"));
0 comments:
Post a Comment