LENGTH function

LENGTH function

Function Name Description Usage Input parameter Return value
LENGTH Calculates the length of a string. The length of a string is the number of characters in the string. LENGTH() N/A Length of the string.

Supported data type

The LENGTH function supports the following data type:

  • String

Example: Calculate the length of a string

Sample data: $var1$ = "Hello Apigee Test"

Usage: $var1$.LENGTH()

Calculate the length of string var1.

Output: 17

Recommendation

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025年12月09日 UTC.