I have a string that is like below.
,liger, unicorn, snipe
in other languages I'm familiar with I can just do a string.trim(",") but how can I do that in c#?
Thanks.
There's been a lot of back and forth about the StartTrim function. As several have pointed out, the StartTrim doesn't affect the primary variable. However, given the construction of the data vs the question, I'm torn as to which answer to accept. True the question only wants the first character trimmed off not the last (if anny), however, there would never be a "," at the end of the data. So, with that said, I'm going to accept the first answer that that said to use StartTrim assigned to a new variable.