Sign in Join
Wiki copytemporary

WideString: what changed

Revision 0 to 1. Removed lines have a minus sign; added lines have a plus sign.

Title: WideString

OldNewLine
1+Back to [[Data type|data types]].
2+
3+The [[Data type|data type]] [[Widestring|WideString]] has no size limit and comprises of an array of type [[WideChar]]. The functions of the LazUTF8 unit are there to facilitate the conversion of types from [[Ansistring|AnsiString]] to [[Widestring|WideString]] and from [[Widestring|WideString]] to [[Ansistring|AnsiString]].
4+
5+The examples below are for Windows operating systems!
6+
7+``` pascal
8+Uses
9+ ...,
10+ LazUTF8,
11+ ...;
12+
13+...
14+
15+{ Definition of the WideString and AnsiString data types }
16+
17+Var
18+ w: WideString;
19+ a: AnsiString;
20+
21+Begin
22+ { Examples of correct assignment of AnsiString to WideString }
23+
24+ w: = UTF8ToUTF16 ('0123ABCabc456AöU!, .-');
25+ w: = w + UTF8ToUTF16 (IntToString (45));
26+
27+ { Example of correct assignment of a WideString to an AnsiString }
28+
29+ a: = UTF16ToUTF8 (w);
30+
31+ ...
32+end;
33+```
34+
35+---
36+*From the Free Pascal wiki, page "WideString", as it stood on 2023-12-22 after a change by Alextpp, 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).*

Back to history