[Snippet] Get character pos

PHP:
0AB1: @GetCharPos 2 string 0@ pos 1@ to 2@

PHP:
:GetCharPos
0C17: 8@ = 0@
if 801D: 1@ > 8@
then
    9@ = 0
    while 001D: 1@ > 9@
        inc(0@)
        9@+=1
    end
    0C2D: strrev in 0@ out 0@
    0062: 8@ -= 1@
    9@ = 0
    8@ -= 1
    while 001D: 8@ > 9@
        inc(0@)
        9@+=1
    end
end
ret 1 0@

By @WaTTi - 2017
 
Top