User Tools

Site Tools


syntax:functions:len

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
syntax:functions:len [2015/04/03 17:55] elenapsyntax:functions:len [2021/08/14 22:16] (current) – [Examples] craigt
Line 1: Line 1:
-===== Len(text) =====+====== Len(text) =====
 +Category:  Text function
  
-Calculates the number of characters (length) of a //text// value. +\\  
 +=====Description===== 
 +This function returns the number of characters (length) in the //text// value.
  
-^  Example  ^  Result  ^ +\\  
-|  len('Telecommunications' |  18  |+=====Use cases==== 
 +This function can be used to determine if there are unexpected non-printing characters in a text string.
  
 +\\ 
 +=====Arguments=====
 +^Argument^Type^Description^
 +|text|Text|The text string evaluated to determine the number of characters it contains.|
  
-Example using a field name:+**Return value type:** Number
  
- Example   Revenue   Result    +\\  
- len([Revenue])  |  100000  |  6  +=====Remarks===== 
 +The number of characters returned //includes// unseen, non-printing characters (space, line feed, tab, etc.) 
 + 
 +//text// is implicitly converted to text values if required 
 + 
 +\\  
 +=====Examples===== 
 + 
 +  len('Telecommunications') //Returns 18 
 + 
 +  len('Computer sciences') //Returns 17  (Includes the space) 
 + 
 +  len(' Genetics ') //Returns 10  (Includes leading and trailing spaces) 
 + 
 +  len('Psychology' & char(9)) (Returns 11  //char(9) = tab, included in the length) 
 + 
 +  len(1000000) //Returns 7  (Implicit conversion of a numeric value to text) 
 + 
 +  len('') //Returns 0  (An empty string has a length of 0) 
 + 
 +  len([MyClass]) //Returns 12  (Using a field name; [MyClass] = 'Astrophysics'
 + 
 +\\  
 +===== See also ===== 
 +  * [[syntax:functions:ifempty|IfEmpty(value, new_value)]] 
 +  * [[syntax:functions:isempty|IsEmpty(value)]]
  
-**See also** 
-  * [[syntax:functions:isempty]] 
-  * [[syntax:functions:ifempty]] 
syntax/functions/len.1428098142.txt.gz · Last modified: 2015/04/03 17:55 by elenap

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki