Logo

Programming-Idioms

History of Idiom 169 > diff from v13 to v14

Edit summary for version 14 by programming-idioms.org:
New Pascal implementation by user [programming-idioms.org]

Version 13

2018-01-27, 12:44:31

Version 14

2018-01-27, 12:46:14

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 := Utf8Length(s);
Comments bubble
UTF8-encoding, as used in Lazarus