Documentation Comments
Use this form to comment on this topic. You can also provide any general observations about the Online Documentation, or request that additional information be added in a future release.
Reality V15.0 ()
LEFT Function (DataBasic MultiValue Compatibility) (m6187ai+left_f.htm)
Returns the specified number of characters from the beginning of a string.
This function is provided for compatibility with other MultiValue systems.
LEFT(string, charCount)
string A DataBasic expression that evaluates to a string.
charCount A DataBasic expression that evaluates to the number of characters to extract. Only the integer part is used.
If negative, one less than the specified number of characters are removed from the end of the string and LEFT returns what remains.
A string containing the specified number of characters from the beginning of the string.
The LEFT function is equivalent to the following substring extraction operation:
string[1, charCount]
RIGHT function, Substring Extraction.
S = "123456789" C = 7 R = LEFT(S, C)
Sets R to "1234567".
S = "123456789" C = -7 R = LEFT(S, C)
Sets R to "123".
S = "123456789" C = 12 R = LEFT(S, C)
Sets R to "123456789" (C is greater than the length of the string, so the complete string is returned).