diff options
author | Pavel Labath <pavelo@centrum.sk> | 2011-08-18 22:23:09 (GMT) |
---|---|---|
committer | Pavel Labath <pavelo@centrum.sk> | 2011-08-18 22:23:09 (GMT) |
commit | d1da576a0ae029e2c1a1b7c1ba0c1b39dbd0e44a (patch) | |
tree | b6af35664dea406c3e10eacecd1d19b36082c067 /src/FbTk/Luamm.hh | |
parent | 1e41d944e4b4fa3f23966eb3891d13a9ef0c7245 (diff) | |
download | fluxbox_pavel-d1da576a0ae029e2c1a1b7c1ba0c1b39dbd0e44a.zip fluxbox_pavel-d1da576a0ae029e2c1a1b7c1ba0c1b39dbd0e44a.tar.bz2 |
Add lua::quote function, for safe (and pretty) quoting of strings
Diffstat (limited to 'src/FbTk/Luamm.hh')
-rw-r--r-- | src/FbTk/Luamm.hh | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/FbTk/Luamm.hh b/src/FbTk/Luamm.hh index 01fb8b1..245d77b 100644 --- a/src/FbTk/Luamm.hh +++ b/src/FbTk/Luamm.hh | |||
@@ -139,6 +139,10 @@ namespace lua { | |||
139 | {} | 139 | {} |
140 | }; | 140 | }; |
141 | 141 | ||
142 | // format the string in a form that can be safely read back by the lua interpreter | ||
143 | // tries to make the string a bit nicer than the lua's %q format specifier | ||
144 | std::string quote(const std::string &str); | ||
145 | |||
142 | // a fancy wrapper around lua_State | 146 | // a fancy wrapper around lua_State |
143 | class state { | 147 | class state { |
144 | lua_State *cobj; | 148 | lua_State *cobj; |