Logo

Programming-Idioms

History of Idiom 169 > diff from v6 to v7

Edit summary for version 7 by Bart:
New Pascal implementation by user [Bart]

Version 6

2018-01-10, 19:58:31

Version 7

2018-01-11, 18:00:11

Idiom #169 String length

Assign to integer n the number of characters of string s.

This can be different from the number of bytes of s.

Idiom #169 String length

Assign to integer n the number of characters of string s.

This can be different from the number of bytes of s.

Extra Keywords
size
Extra Keywords
size
Imports
uses LazUtf8;
Code
n := length(s); //single byte encoding or widestring, plain pascal
n := Utf8Length(s); //UTF8-encoding, as used in Lazarus