[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"
separately).
Stefan
- Re: How to walk a Lisp_String?, (continued)
- Re: How to walk a Lisp_String?, Manuel Giraud, 2022/09/02
- Re: How to walk a Lisp_String?, Po Lu, 2022/09/02
- Re: How to walk a Lisp_String?, Manuel Giraud, 2022/09/02
- Re: How to walk a Lisp_String?, Po Lu, 2022/09/02
- Re: How to walk a Lisp_String?, Tomas Hlavaty, 2022/09/03
- Re: How to walk a Lisp_String?, Po Lu, 2022/09/03
- Re: How to walk a Lisp_String?, Tomas Hlavaty, 2022/09/03
- Re: How to walk a Lisp_String?, Eli Zaretskii, 2022/09/02
- Re: How to walk a Lisp_String?, Manuel Giraud, 2022/09/02
- Re: How to walk a Lisp_String?, Eli Zaretskii, 2022/09/02
Re: How to walk a Lisp_String?,
Stefan Monnier <=