length

returns the number of characters in a string.

# Metadata

Platforms: desktop, server, mobile OS: mac, windows, linux, ios, android Introduced: 1.0 Security:

# Syntax

the length of string

# Params

- string :

# Examples

the length of "ABC" -- returns 3

repeat with x = 1 to the length of receivedData

put char (length(it) - 3) to (length(it)) of it into myExtension

# Description

Use the length function to find out how many characters are in a string, in order to process each character.

The length of a string is the number of characters in the string. The expression the length of string is equivalent to

the number of chars in string

If the string is empty, its length is zero.

# Tags

# See

- **keyword:** character, characters, integer, string - **operator:** begins with, ends with - **property:** number - **function:** offset, number - **glossary:** return, non-negative - **control structure:** function