Unicodestring/fr: what changed
Revision 0 to 1. Removed lines have a minus sign; added lines have a plus sign.
Title: Unicodestring/fr
| Old | New | Line | |
|---|---|---|---|
| 1 | + | Le [[Data type/fr|type de donnée]] **UnicodeString** n'a pas de limitation de taille et se compose en interne d'un tableau de type de donnée [[Unicodechar/fr|UniCodeChar]]. | |
| 2 | + | ||
| 3 | + | Les fonctions de l'unité **LCLProc** sont là pour faciliter les conversions de types de [[Ansistring/fr|AnsiString]] vers **UnicodeString** et de **UnicodeString** vers **Ansistring**. Les Unicodestring sont employées pour afficher des chaînes à partir du jeu de caractères Unicode. Les Unicodestring sont mises en oeuvre de la même manière que les Ansistring et peuvent être converties en [[Punicodechar/de|PUnicodeChar]]. | |
| 4 | + | ||
| 5 | + | Définition d'un [[Data field/fr|champ de donnée]] de [[Data type/fr|type de donnée]] **UnicodeString** : | |
| 6 | + | ||
| 7 | + | ``` pascal | |
| 8 | + | Var | |
| 9 | + | u: UniCodeString; | |
| 10 | + | a: AnsiString; | |
| 11 | + | ``` | |
| 12 | + | ||
| 13 | + | Les exemples sont pour des systèmes d'exploitation Windows !\ | |
| 14 | + | Exemples d'affectation correcte d'une AnsiString vers une WideString : | |
| 15 | + | ||
| 16 | + | ``` pascal | |
| 17 | + | u := UTF8ToUTF16('0123ABCabc456AöU!,.-'); | |
| 18 | + | u := u + UTF8ToUTF16(IntToString(45)); | |
| 19 | + | ``` | |
| 20 | + | ||
| 21 | + | Exemples d'affectation correcte d'une WideString vers une AnsiString : | |
| 22 | + | ||
| 23 | + | ``` pascal | |
| 24 | + | a := UTF16ToUTF8(u); | |
| 25 | + | ``` | |
| 26 | + | ||
| 27 | + | # Voir aussi | |
| 28 | + | ||
| 29 | + | - [[Character and string types/fr|Types caractères et chaînes]] | |
| 30 | + | ||
| 31 | + | --- | |
| 32 | + | *From the Free Pascal wiki, page "Unicodestring/fr", as it stood on 2020-03-02 after a change by Trev, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's [[Licensing]] page. If you have concerns about this material, [message the admin](/wiki-contact).* |
