Skip to content

STL

String Length

This numeric function returns the length of a simple string variable. It performs more quickly than the LEN function, but cannot be used on string constants, substrings, or elements of a string array.

STL ( string-variable )
string-variable
is a simple string variable name. This is the only valid value. String constants, substrings, and elements of a string array are not valid values.

This function is generally available starting with release level 8.1.

A$ = "TESTSTRING"
PRINT STL(A$)

displays 10, the length of the string contained in the A$ string variable.

PRINT STL("TESTSTRING")

generates an error because “TESTSTRING” is not a string variable.

LEN function

From the Thoroughbred Basic Language Reference, Volume III: R–Z, version 8.9.1. Open this page in the PDF