BMC PSL function(40)-length()

length()

含义:Return the number of characters in a text string

Format

length(text)

Parameter

Parameter Definition
text

text to be counted for character length

The text can be a text string enclosed in double quotation marks,or one or more PSL commands that produce text as output.

Description

The length() function returns the length in characters of text, including new lines.This function differs from num_bytes(), which returns the length of a string in bytes.Due to international codesets, one or more bytes can form a single character.

Example

Code:

x="28 characters