lua - Lua 标点字符串模式 (%p) 中包含哪些字符?

标签 lua punctuation lua-patterns

我还没有找到关于哪些字符构成标点符号集的文档 "%p"在卢阿。

最佳答案

答案是取决于地区 ,它是 C 函数的直接接口(interface)。
实际上,如果有一个 C 标准函数可以做一些类似于 Lua 函数的事情,那么几乎可以肯定,Lua 函数只是包装了 C 函数、疣和所有东西,即使没有查看具体情况。
(这是 file:read() 在 5.2 中仍然有 trouble reading text with embedded zeroes 的部分原因,甚至可能在 5.3 中会有)

Amadena good answer for the "C" locale , 和 ColonelThirtyTwothe right way to check for the current locale ,C标准只说:

ispunct(): The ispunct function tests for any printing character that is one of a locale-specific set of punctuation characters for which neither isspace nor isalnum is true. In the "C" locale, ispunct returns true for every printing character for which neither isspace nor isalnum is true.

关于lua - Lua 标点字符串模式 (%p) 中包含哪些字符?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24196137/

相关文章:

c - 尝试使用 mingw 构建和编译 lua 5.3.3 , undefined reference 错误

lua - 关于 Lua 5.3 字节码的文档

lisp - 为什么连字符在 LISP 的符号名称中是约定俗成的?

lua - 在 LUA 中进行模式匹配时,如何将单词与数字组合起来?

string - 模式之间的 Lua string.gsub 文本

lua - Lua 字符串什么时候被实例化?

python - 在 Python 中删除列表中的标点符号

grammar - 我应该为单句警报/通知弹出窗口使用正确的标点符号吗?

Lua-Pattern - 评估条件表达式

lua - 不推荐使用 `gui` 、 `guifg` 、 `guibg` 、 `guisp` - Neovim