Reputation: 2629
I want to remove a specific character from the end and the beginning of string.
Example:
Any idea
Upvotes: 1
Views: 72
Reputation: 35353
string s = ";Maro;Mike;Tim;"; string s2 = s.Trim(';');
Upvotes: 6
Reputation: 7475
Try this:
input.Trim(";".ToCharArray())
Upvotes: 4