From some arbitrary position in a string I need to find the closest position of a character to the left of my position. If I was wanting to perform this operation to the right I could just use .IndexOf, but how to do it to the left I am unsure.
The two ways I came up with were just a decrementing loop starting at my position or, putting the string in reverse and using a normal .IndexOf
Anyone else have any better ways of acheiving this?