Lingo Dictionary > L-N > number (characters) |
![]() ![]() ![]() |
number (characters)
Syntax
the number of chars in
chunkExpression
Description
Chunk expression; returns a count of the characters in a chunk expression.
Chunk expressions are any character (including spaces and control characters such as tabs and carriage returns), word, item, or line in any container of characters. Containers include field cast members and variables that hold strings, and specified characters, words, items, lines, and ranges in containers.
Note: The count()
function provides a more efficient alternative for determining the number of characters in a chunk expression.
Example
This statement displays the number of characters in the string "Macromedia, the Multimedia Company" in the Message window:
put the number of chars in "Macromedia, the Multimedia Company"
The result is 34.
Example
This statement sets the variable charCounter
to the number of characters in the word i located in the string Names:
charCounter = the number of chars in member("Names").word[i]
You can accomplish the same thing with text cast members using the syntax:
charCounter = member("Names").word[i].char.count
See also
length()
, char...of
, count()
, number (items)
, number (lines)
, number (words)
![]() ![]() ![]() |