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
Last revisionBoth sides next revision
syntax:functions:left [2021/07/28 00:51] craigtsyntax:functions:left [2021/07/28 01:10] craigt
Line 9: Line 9:
 =====Arguments===== =====Arguments=====
 ^Argument^Type^Description^ ^Argument^Type^Description^
-|text|Text|Any text value (in single or double quotes), or other value that can be implicitly converted to text if required.| +|text|Text|The text value to extract the symbols from.| 
-|no_of_chars|Integer|The number of symbols returned from the left side of the //text// argument.|+|no_of_chars|Integer, minimum of 0|The number of symbols returned from the left side of the //text// argument.|
  
 **Return value type:** Text **Return value type:** Text
Line 17: Line 17:
 =====Remarks===== =====Remarks=====
 Regardless of the type of value passed in for //text//, the result of this function is //always// a text value. 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. 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.
Line 26: Line 28:
  
   left('Los Angeles', 3) = 'Los'   left('Los Angeles', 3) = 'Los'
-  left('IT services', 2) = 'IT'+  left('IT services', 8) = 'IT servi' 
 +  left('Canada',10) = 'Canada' 
 +  left('EasyMorph',0) = ''  //Empty value
   left(12345, 3) = '123'  //Note, the numeric value of 12345 was passed in.  The result is a text value.   left(12345, 3) = '123'  //Note, the numeric value of 12345 was passed in.  The result is a text value.
   left(#2021-10-21, 3) = '444'  //2021-10-21 is 44490 as a converted date serial value, so '444' is returned.   left(#2021-10-21, 3) = '444'  //2021-10-21 is 44490 as a converted date serial value, so '444' is returned.
Line 33: Line 37:
 \\  \\ 
 ===== See also ===== ===== See also =====
-  * [[syntax:functions:right]] +  * [[syntax:functions:right|Right(text, no_of_chars)]] 
-  * [[syntax:functions:mid]] +  * [[syntax:functions:mid|Mid(text, N, K)]]
syntax/functions/left.txt · Last modified: 2021/08/14 22:15 by craigt

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki