lua-users home
lua-l archive

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

What about `not str:find("\0")`? that is, just check directly for the
thing you want.

On 11/01/2017 07:26 PM, Soni L. wrote:
> The simple pattern "^%Z*$" validates whether a string is C-compatible.
> It looks slightly nicer than "^[^\0]*$" and doesn't require the use of
> string literal escapes.
> Please keep %Z.