lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


but what is the best way of doing the same thing for a string where the
delimiter is ;;, e.g.

s = "a;;b;;c"             (where a, b and c can be any length and can
include non repeating occurrences of ; )

The encoding format seems ambiguous. E.g.,

  Input 1  |  Input 2  | Encoded
  ---------+-----------+--------
     a;    |     b     |  a;;;b
     a     |    ;b     |  a;;;b

There is no way to parse a;;;b and be guaranteed to recover the original inputs.

Scott