dBASE Plus supports two types of strings:

A primitive string that is compatible with earlier versions of dBASE

A JavaScript-compatible String object.

dBASE Plus will convert one type of string to the other on-the-fly as needed. For example, you may use a String class method on a primitive string value or a literal string:

? version( ).toUpperCase( )

? "peter piper pickles".toProperCase( )

This creates a temporary String object from which the method or property is called. You may also use a string function on a String object.

Many string object methods have built-in string functions that are practically identical, while others are merely similar with subtle differences.

Note

JavaScript is zero-based; dBL is one-based. For example, to extract a substring starting with the third character, you would use the parameter 2 with the substring( ) method, and the parameter 3 with the SUBSTR( ) function.

The maximum length of a string in dBL is approximately 1 billion characters, or the amount of virtual memory, whichever is less.