The previous code would not allow things like string_sub(str, "\\", "/", 0).