R
Ron Garret
Is there a way to do string slice assignment in Javascript other than
tearing the string apart and reassembling it? I want to do the
equivalent of:
s1[x:y] = s2
in Python. Is there a better way than (something like) this?
s1 = s1.slice(0,x) + s2 + s1.slice(y)
Thanks,
rg
tearing the string apart and reassembling it? I want to do the
equivalent of:
s1[x:y] = s2
in Python. Is there a better way than (something like) this?
s1 = s1.slice(0,x) + s2 + s1.slice(y)
Thanks,
rg