I work with a long string on javasctipt, and I have to replace substrings that I cannot predetermine their length and value where I cannot use str.replace(/substr/g,'new string'), which does not allow replacing the substring, which I can simply determine its initial position and its length.
Is there a function that I can use like string substr (string, start_pos, length, newstring)?
source
share