[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to walk a Lisp_String?

From: Stefan Monnier
Subject: Re: How to walk a Lisp_String?
Date: Thu, 01 Sep 2022 11:42:06 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

> I'm at a point where I'd like to walk a struct Lisp_String one
> «character» at a time.  Of course, I should be able to handle multi-byte
> Lisp_String.  How could I do that?

SDATA gives you a pointer to the actual bytes of the string, and then
you can use `string_char_and_length` to read a char along with its size
in bytes (you have to keep track of your "charpos" and "bytepos"


reply via email to

[Prev in Thread] Current Thread [Next in Thread]