Difference between revisions of "LEN()"

From Lianjapedia
Jump to: navigation, search
Line 6: Line 6:
  
 
==See Also==
 
==See Also==
[[AT()]], [[LEFT()]], [[RAT()]], [[RIGHT()]], [[SET STRESCAPE]], [[STREXTRACT()]], [[STRLEN()]], [[STRTRAN()]], [[STUFF()]], [[SUBSTR()]]
+
[[AT()]], [[LEFT()]], [[LENC()]], [[RAT()]], [[RIGHT()]], [[SET STRESCAPE]], [[STREXTRACT()]], [[STRLEN()]], [[STRTRAN()]], [[STUFF()]], [[SUBSTR()]]
  
 
==Description==
 
==Description==
Line 30: Line 30:
 
[[Category:Documentation]]
 
[[Category:Documentation]]
 
[[Category:Functions]]
 
[[Category:Functions]]
 +
[[Category:String Data Functions]]

Revision as of 04:30, 15 September 2014

Purpose

Function to return length of specified expression

Syntax

LEN(<exp>[,<expL>])

See Also

AT(), LEFT(), LENC(), RAT(), RIGHT(), SET STRESCAPE, STREXTRACT(), STRLEN(), STRTRAN(), STUFF(), SUBSTR()

Description

The LEN() function returns the output width of the specified expression <exp>. The expression can be of any data type, including memo fields and arrays. When checking the length of character expressions, the optional <expL> can be specified. If <expL> is specified and evaluates to .T. (true), the LEN() function will return the length of the character expression after stripping any formatting options such as BOLD().

Example

open database southwind
use example
? len(last_name)
        16
? len(notes)
      8851
? len("")
         0
? len(bold("Hello"))
         9
? len(bold("Hello"),.T.)
         5