T
Tom de Neef
I need to change one character at a known position in a string.
In Pascal I would change the P's character of a string S into 'x' with
S[P]:='x';
In JavaScript I come no further than S = S.substr(0,P-2)+'x'+S.substr(P)
Is there really no more trivial way? I'm looking for the write equivalent of
S.charAt(P).
TIA
Tom
In Pascal I would change the P's character of a string S into 'x' with
S[P]:='x';
In JavaScript I come no further than S = S.substr(0,P-2)+'x'+S.substr(P)
Is there really no more trivial way? I'm looking for the write equivalent of
S.charAt(P).
TIA
Tom