Logo

Programming-Idioms

History of Idiom 169 > diff from v26 to v27

Edit summary for version 27 by Matek:
[Pascal] Fixed imports section.

Version 26

2018-03-10, 23:13:38

Version 27

2018-03-10, 23:14:56

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