Mailinglist Archive: yast-devel (23 mails)

< Previous Next >
Re: [yast-devel] YCP String operator [] and UTF-8


On Mar 30 17:01 Ladislav Slezak wrote (excerpt):
YCP string operator [] takes _byte_ index in the string, while size(string)
_number_of_characters_. The problem is when you combine both functions, the
will be probably buggy, see

Could a YCP expert show the correct way (example code)
how to remove an UTF8 sub-string from an UTF8 string?
I.e. how to remove "Bar" from "FooBarBaz" in an UTF8-safe way?

More generally:
Is there documentation how to work on UTF8 strings with YCP in general?

Kind Regards
Johannes Meixner
SUSE LINUX Products GmbH -- Maxfeldstrasse 5 -- 90409 Nuernberg -- Germany
HRB 16746 (AG Nuernberg) GF: Jeff Hawn, Jennifer Guild, Felix Imendoerffer
To unsubscribe, e-mail: yast-devel+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: yast-devel+owner@xxxxxxxxxxxx

< Previous Next >
List Navigation
Follow Ups