Difference between revisions of "STRLEN()"
From Recital Documentation Wiki
Yvonnemilne (Talk | contribs) |
Yvonnemilne (Talk | contribs) |
||
Line 1: | Line 1: | ||
− | |||
− | |||
==Class== | ==Class== | ||
− | + | Expressions and Type Conversion | |
==Purpose== | ==Purpose== | ||
− | + | Function to return length of specified expression | |
==Syntax== | ==Syntax== | ||
− | + | STRLEN(<exp>[,<expL>]) | |
==See Also== | ==See Also== | ||
− | + | [[AT()]], [[LEFT()]], [[LEN()]], [[RAT()]], [[RIGHT()]], [[STREXTRACT()]], [[STRTRAN()]], [[STUFF()]], [[SUBSTR()]] | |
==Description== | ==Description== | ||
− | + | The STRLEN() 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 STRLEN() function will return the length of the character expression after stripping any formatting options such as BOLD(). | |
==Example== | ==Example== | ||
<code lang="recital"> | <code lang="recital"> | ||
− | + | open database southwind | |
+ | use example | ||
+ | ? strlen(last_name) | ||
+ | 16 | ||
+ | ? strlen(notes) | ||
+ | 8851 | ||
+ | ? strlen("") | ||
+ | 0 | ||
+ | ? strlen(bold("Hello")) | ||
+ | 9 | ||
+ | ? strlen(bold("Hello"),.T.) | ||
+ | 5 | ||
</code> | </code> | ||
− | |||
+ | ==Products== | ||
+ | Recital Server, Recital | ||
[[Category:Documentation]] | [[Category:Documentation]] | ||
[[Category:Functions]] | [[Category:Functions]] |
Revision as of 12:08, 13 October 2009
Class
Expressions and Type Conversion
Purpose
Function to return length of specified expression
Syntax
STRLEN(<exp>[,<expL>])
See Also
AT(), LEFT(), LEN(), RAT(), RIGHT(), STREXTRACT(), STRTRAN(), STUFF(), SUBSTR()
Description
The STRLEN() 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 STRLEN() function will return the length of the character expression after stripping any formatting options such as BOLD().
Example
open database southwind use example ? strlen(last_name) 16 ? strlen(notes) 8851 ? strlen("") 0 ? strlen(bold("Hello")) 9 ? strlen(bold("Hello"),.T.) 5
Products
Recital Server, Recital