nl_tokens: Applies the change to the script . The change is always a substring ( change_pos change_pos + change_len ) being replaced with a completely different string new_str . This API is a legacy and is obsolete .
pl_tokens: function ApplySingleChunkPatch ( <mask> , change_pos , change_len , new_str , change_log ) { var old_source = script . source ; // Prepare new source string. var new_source = old_source . substring ( 0 , change_pos ) + new_str + old_source . substring ( change_pos + change_len ) ; return ApplyPatchMultiChunk ( script , [ change_pos , change_pos + change_len , change_pos + new_str . length ] , new_source , false , change_log ) ; }