我还没有找到关于哪些字符构成标点符号集的文档 "%p"
在卢阿。
最佳答案
答案是取决于地区 ,它是 C 函数的直接接口(interface)。
实际上,如果有一个 C 标准函数可以做一些类似于 Lua 函数的事情,那么几乎可以肯定,Lua 函数只是包装了 C 函数、疣和所有东西,即使没有查看具体情况。
(这是 file:read()
在 5.2 中仍然有 trouble reading text with embedded zeroes 的部分原因,甚至可能在 5.3 中会有)
而Amaden给 a good answer for the "C" locale , 和 ColonelThirtyTwo给 the right way to check for the current locale ,C标准只说:
ispunct()
: Theispunct
function tests for any printing character that is one of a locale-specific set of punctuation characters for which neitherisspace
norisalnum
is true. In the "C" locale,ispunct
returns true for every printing character for which neitherisspace
norisalnum
is true.
关于lua - Lua 标点字符串模式 (%p) 中包含哪些字符?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24196137/