On Sat, Oct 9, 2021 at 12:53 PM Eli Zaretskii <
eliz@gnu.org> wrote:
> You mean iterate the string being analysed by bytes, and use strchr() on
> byte_i and a constant you'll provide me? And if we reach a byte that's
> part of a multibyte one, we bail, knowing that it's not all ASCII
> punctuation... Is that the idea? Should work, yes.
Yes. But I think we could use strcspn for an easier, one-line, test
of the same.
I tried to use strcspn() to discover if a C string is entirely comprised
of punctuation (as is required by your idea), but couldn't. That function
deals with prefixes, it's not a "every()" kind of operation. If you're
seeing something clever to do with it, please tell me, because I'm not.
João