BlitzMax/Language/Strings

Strings are used to store sequences of characters.

Strings are actually objects, so can be used where ever an object is expected. Strings provide the following methods:

Strings also provide a read-only length field. Here is an example of using string methods:

Local t:String="***** HELLO *****"

Print t.length  'return length of string: 17 Print t.Find( "HE" ) 'returns index of substring "HE": 6 Print t.Replace( "*","!" ) 'replaces all "*" with "!" Print t.ToLower 'coverts string to lowercase Print ":".Join( ["Hello","World"] ) 'returns "Hello:World"

String also provide the following functions to help with the creation of strings:

To call a string function, use: String.Function - for example:

Print String.FromInt( 10 )