1. Home
  2. Computing & Technology
  3. Delphi Programming
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?
Explore Delphi Programming
About.com Special Features

Reader's Choice Award Winners

What are the best instant messengers, apps, editors and more? You told us, for our 2010 technology awards program. More >

iPad Central

Is Apple's new tablet computer impractical, a must-have -- or both? We'll help you figure it out. More >

  1. Home
  2. Computing & Technology
  3. Delphi Programming

©2010 About.com, a part of The New York Times Company.

All rights reserved.