Widestring/fr: what changed
Revision 0 to 1. Removed lines have a minus sign; added lines have a plus sign.
Title: Widestring/fr
| Old | New | Line | |
|---|---|---|---|
| 1 | + | Le [[Data type/fr|type de donnée]] **WideString** n'a pas de limite de taille et consiste en un tableau de type [[Widechar/fr|WideChar]]. | |
| 2 | + | ||
| 3 | + | Les fonctions de l'unité **LCLProc** sont là pour faciliter les conversions de types de [[Ansistring/fr|AnsiString]] vers **WideString** et de **WideString** vers **Ansistring**. | |
| 4 | + | ||
| 5 | + | Définition d'un champ de donnée de type AnsiString : | |
| 6 | + | ||
| 7 | + | ``` pascal | |
| 8 | + | Var | |
| 9 | + | w: WideString; | |
| 10 | + | a: AnsiString; | |
| 11 | + | ``` | |
| 12 | + | ||
| 13 | + | Les exemples sont pour des systèmes d'exploitation Windows ! Exemples d'affectation correcte d'une AnsiString vers une WideString : | |
| 14 | + | ||
| 15 | + | ``` pascal | |
| 16 | + | w := UTF8ToUTF16('0123ABCabc456AöU!,.-'); | |
| 17 | + | w := w + UTF8ToUTF16(IntToString(45)); | |
| 18 | + | ``` | |
| 19 | + | ||
| 20 | + | Exemple d'affectation correcte d'une WideString vers une AnsiString : | |
| 21 | + | ||
| 22 | + | ``` pascal | |
| 23 | + | a := UTF16ToUTF8(w); | |
| 24 | + | ``` | |
| 25 | + | ||
| 26 | + | --- | |
| 27 | + | *From the Free Pascal wiki, page "Widestring/fr", as it stood on 2019-08-19 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).* | |
| 28 | + | Category: Data types/fr | |
| 29 | + | Category: Français |
