[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: isprint/isgraph not strictly do-able in Lua
- From: Reuben Thomas <rrt@...>
- Date: Sun, 24 Oct 2010 16:36:54 +0100
The weasel words of the ISO C standard say:
"the term control character refers to a member of a locale-specific
set of characters that are not printing characters."
Therefore one cannot, sadly, deduce that string.match(s, "%C") is the
same as isprint.
(isgraph is the same as isprint, but is not true for the space character).
I plan to add isprint and isgraph to luaposix for this reason (in
common with some other useful bits of the C standard library that are
missing from the Lua standard libraries).
--
http://rrt.sc3d.org
--
http://rrt.sc3d.org