# LEN()

Returns size of a string or size of an array.

Syntax

  LEN( <cString> | <aArray> ) --> <nLength>

Arguments

  <acString> is a character string or the array to check.

Returns

  The length of the string or the number of elements that contains an array.

Description

  This function returns the string length or the size of an array. If it is used with a multidimensional array it returns the size of the first dimension.

Examples

          ? LEN( "Harbour" )           // 7
          ? LEN( { "One", "Two" } )    // 2
    Tests
          function Test()
             LOCAL cName := ""
             ACCEPT "Enter your name: " TO cName
             ? LEN( cName )
          return nil

Status

  Ready

Compliance

  LEN() is fully CA-Clipper compliant.

Files

  Library is rtl

See Also

- EMPTY()
- RTRIM()
- LTRIM()
- AADD()
- ASIZE()