Hi
I want if first character is + then it should be removed
+919817666660 should give 9817666660
Thanks
Hi
I want if first character is + then it should be removed
+919817666660 should give 9817666660
Thanks
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Jignesh KumarRank #91 · 22.9K reputationPosted Apr 9, 2023, 12:40 AM EDT
Hello Ramco,
You can use TrimStart(), which will do the same thing, removing the character you want to trim from the beginning of the string.
string mob = "+919817666660"; var res = mob.TrimStart('+');