1. Computing
Glossary|Tips/Tricks|FREE App/VCL|Best'O'Net|Books|Link Back

Delphi Programming RTL Reference|By Category|Alphabetically|By Unit
 

Length

unit
System
category
string handling routines

declaration
function Length(const S: string): integer
function Length(const S: array): integer

description
Returns an integer containing the number of characters in a string or the number of elements in an array.
For an array, Length(S) always returns Ord(High(S))-Ord(Low(S))+1

example
var s : string;
    i : integer;

s:='DELPHI';
i := Length(s);
//i=6;

in real code
String Types in Delphi
Understanding and managing string data types in Delphi's Object Pascal. Learn about differences between Short, Long, Wide and null-terminated strings.
Arrays in Object Pascal
Understanding and using array data types in Delphi.
Traveling Label
Spice up your user interface with a marquee style text. Use marquee style text to display scrolling text that you want to catch your Delphi program users' attention.

see also
Delete, Insert, Copy, Concat, Pos,


 Free Delphi code snippet inside every Delphi Newsletter!
Subscribe to the Newsletter
Name
Email

 Got some code to share? Got a question? Need some help?

©2013 About.com. All rights reserved.