Re: [xml] iterating an UTF-8 string (xmlChar)
- From: Roberto Diaz <rdm354 tid es>
- To: veillard redhat com
- Cc: xml gnome org
- Subject: Re: [xml] iterating an UTF-8 string (xmlChar)
- Date: Thu, 14 Jul 2005 13:12:47 +0200
El jue, 14-07-2005 a las 12:59, Daniel Veillard escribió:
On Thu, Jul 14, 2005 at 11:56:53AM +0200, Roberto Diaz wrote:
How do I iterate the string?
depends what you want to do with it
while ( myString[i] != 0) {
i++;
}
This is ok in case I know all characters are represented by one byte..
(this is what I understand).
no this is *always* okay. 0 is the string terminator
I mean it is not always okay to iterate the characters, it is always
okay to iterate the string itself.. I understand.
input is length in bytes of the string
output is length in bytes of the character returned
Ok.. thank you very much..
Regards
Roberto.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]