User Tools

Site Tools


syntax:functions:left

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:left [2015/05/26 09:22] dmitrysyntax:functions:left [2021/08/14 22:15] (current) – [Examples] craigt
Line 1: Line 1:
-===== Left(text, N) =====+====== Left(text, no_of_chars) =====
 +Category:  Text function
  
-Returns //N// left symbols of the specific //text//, where //N// is number. First argument is implicitly converted into text, if required.+\\  
 +=====Description===== 
 +This function returns the specified number of symbols from the left of //text// as a text value.
  
- Example   Result  +\\  
- left('Los Angeles', 3)   Los  +=====Arguments===== 
- left('IT services'2)   IT  |+^Argument^Type^Description
 +|text|Text|The text value to extract the symbols from.
 +|no_of_chars|Integerminimum of 0|The number of symbols returned from the left side of the //text// argument.|
  
-**See also** +**Return value type:** Text 
-  * [[syntax:functions:right]] + 
-  * [[syntax:functions:mid]]+\\  
 +=====Remarks===== 
 +Regardless of the type of value passed in for //text//, the result of this function is //always// a text value. 
 + 
 +Entering a //no_of_chars// of 0 will return an empty value.  Entering a //no_of_chars// greater than the length of //text// will result in the full //text// value being returned. 
 + 
 +Numbers and equations can be used as the //text// argument and are implicitly converted to their text-equivalent.  When passing in an equation for //text//, //no_of_chars// number of symbols from the equation's //result// will be returned. 
 + 
 +Passing in a date value (#yyyy-MM-dd) will return //no_of_chars// number of symbols from the converted date serial value.  See the examples below. 
 + 
 +\\  
 +=====Examples===== 
 + 
 +  left('Los Angeles', 3) //Returns 'Los' 
 + 
 +  left('IT services', 8) //Returns 'IT servi' 
 + 
 +  left('Canada',10) //Returns 'Canada' 
 + 
 +  left('EasyMorph',0) //Returns ''  (Empty value) 
 + 
 +  left(12345, 3) //Returns '123'  (Note, the numeric value of 12345 was passed in.  The result is a text value.) 
 + 
 +  left(#2021-10-21, 3) //Returns '444'  (2021-10-21 is 44490 as a date serial value, so '444' is returned.) 
 + 
 +  left(100*3, 1) //Returns '3'  (The result of 100 3 = 300, so '3' is returned as the leftmost character.) 
 + 
 +\\  
 +===== See also ===== 
 +  * [[syntax:functions:right|Right(text, no_of_chars)]] 
 +  * [[syntax:functions:mid|Mid(text, N, K)]]
syntax/functions/left.1432646574.txt.gz · Last modified: 2015/05/26 09:22 by dmitry

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki