Shmewnix Shmewnix - 28 days ago 4x Question

How to Trim consecutive Characters

I'm looking to trim (drop) consecutive characters, and everything in front of it in

An example of the output:


What I'd like to do - is trim '01' and any character in front of it. So my desired output would be:


I attempted to use

Dim charsToTrim() As Char = { "01"c}

However, you're only allowed to use 1 character at a time this way in Since i may have "0" or "1", I can't break it up like this:

Dim charsToTrim() As Char = { "0"c,"1",c}

Function Trim01(ByVal input As String) As String
    Dim pos = input.IndexOf("01")

    Return If(pos >= 0, input.Substring(pos + "01".Length), input)
End Function