- Product Reviews
- Find Me
- Connect With Me
How to trim that last occurrence of a character in C#
The below example will show you how to do that:)
string str = "www.sibeeshpassion.com|"; string afterTrim = str.TrimEnd('|');
I am Sibeesh Venu, an Engineer by Profession and Writer by Passion. 2 times Microsoft MVP, 3 times C# Corner MVP, DZone MVB, Author, Speaker, Full Stack Developer.