Welcome to jBASE's new documentation site! Many answers to your questions can be found by searching the Knowledgebase or viewing the jBASE Documentation. We also have a Google Group for peer discussion about jBASE. If you are unable to find the information you are looking for, jBASE Support will be glad to assist in resolving your technical problems. Enjoy and please provide comments and feedback .

How can we help you?

LEFT

Description

The LEFT() function extracts a sub-string of a specified length from the beginning of a string.

LEFT(expression, length)

Where: 

  • expression evaluates to the string from which the sub string is extracted.
  • length is the number of extracted characters if length is less than 1, LEFT() returns null.


Note:

The LEFT function is equivalent to sub-string extraction starting from the first character position, i.e. expression[1,length]

An example of use is as:

      STR_VAL =" Today's Brush is Tomorrows Forest.- Bemba Proverb"
      CRT LEFT(STR_VAL, 14)
      CRT DQUOTE(LEFT(STR_VAL,999))
      CRT DQUOTE(LEFT(STR_VAL,0))

to display:

Today's Brush
" Today's Brush is Tomorrows Forest.- Bemba Proverb"
""

to the screen. 


See also: RIGHT

Go back to jBASE BASIC.

Was this article helpful?