How to delete a character from the string at a certain position from the end?


I have a string e.g.

    Dim str as string = xxxxxxxxxxxxxxxxxxxx£xxx£xxxx**£**xxxxxxxxxx

I want to remove £ in the bold which is always at certain position (11th for instance) from the end. The whole string is a long one, always change in size and can't be counted from the start. Can't use Replace as well, there may be same characters at other positions that I don't wish to remove.

SOLUTION: Dim rst As String = str.Remove(str.Length - 11, 1)



Edit: Whoops, I dunno what I was thinking on that first part..

The correct version of the first part would be:

str = str.Substring(0, str.Len -13) + str.Substring(str.Len-11);

There also may be an overload for the String.Delete function that allows you to use a negative number to represent the number of characters from the end of the string -- i know that the C# equivalent does..