oh, still needs some times for me to understand
thnks a lot!
btw, afaik there's nothing wrong with your xString code. it's just not really neat.
I will mention one thing:
sometimes you give one extra linebreak after local declaration, sometimes not
method insert takes integer pos, string str returns thistype
local integer len = StringLength(str)
if ( assert_range(pos) ) then
method compareSubstrings takes integer pos, integer len, string str, integer subpos, integer sublen returns integer
local string sub = SubString(value, pos, pos+len)
local string sub2 = SubString(str, subpos, subpos+sublen)
local integer result = - 1
if sub == sub2 then