How to trim that last occurrence of a character in C#

How to trim that last occurrence of a character in C#
The below example will show you how to do that:)
[csharp]
string str = "www.sibeeshpassion.com|";
string afterTrim = str.TrimEnd(‘|’);
[/csharp]
Here we are trimming the char ‘|’.

Leave a Reply

Your email address will not be published. Required fields are marked *

Serverless 360