Name
LeftStr -- return the n leftmost characters of a string
Synopsis
var$ = LeftStr(string$, len[, encoding])
Function
This function returns the len leftmost characters of string$.

The optional encoding parameter can be used to set the character encoding to use. This defaults to the default string encoding set using SetDefaultEncoding(). See Character encodings for details.

Inputs
string$
source string
len
number of characters to return
encoding
optional: character encoding to use (defaults to default string encoding) (V7.0)
Results
var$
resulting string
Example
test$ = LeftStr("Hello World!", 5)
Print(test$)
This will print "Hello" to the screen.

Show TOC