All Tags »
C#
Sorry, but there are no more tags available to filter with.
-
How many times have you written this to trim a trailing slash from a path:
if (myPath.EndsWith(''\\''))
/* or ''/'' in the case of a URI */
myPath = myPath.Substring(0,
myPath.Length-1);
Next time, try this:
myPath = myPath.TrimEnd(new char[]{'\\',
'/'});
>>
>
In
addition to ...