|
On 10/12/2017 07:56 PM, Egor Skriptunoff wrote:
> function end_of_string_literal (text, start_pos, quote)
> return text:gsub("\\?.", {[quote]="\0"}):match("%z()", start_pos)
> end
>
> print(end_of_string_literal ([[a="\"A",b="\\\"B\"",c="C"]], 4, '"')) --> 8 What task this code solves?
> print(end_of_string_literal ([[a="\"A",b="\\\"B\"",c="C"]], 12, '"')) --> 20
> print(end_of_string_literal ([[a="\"A",b="\\\"B\"",c="C"]], 24, '"')) --> 26