Logo

Programming-Idioms

History of Idiom 169 > diff from v25 to v26

Edit summary for version 26 by Matek:
New Pascal implementation by user [Matek]

Version 25

2018-02-16, 23:51:20

Version 26

2018-03-10, 23:13:38

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
sysutils
Code
n := s.length();
Comments bubble
Works correctly in Lazarus IDE v. >= 1.8.0.
Doc URL
https://www.freepascal.org/docs-html/rtl/sysutils/tstringhelper.length.html