Strings

[ Back ]

Besides from the regular + and - operators, there is a bunch of functions that you can use to manipulate strings.

Sub routines

function len(txt$)
function lower$(txt$)
function upper$(txt$)
function left$(txt$, n)
function right$(txt$, n)
function mid$(txt$, pos)
function mid$(txt$, pos, n)
function instr(txt$, sub$)
function instr(txt$, sub$, pos)


function len(txt$)

Return the character length of txt.


function lower$(txt$)

Return txt will all letters converted to lower case.


function upper$(txt$)

Return txt with all letters converted to upper case.


function left$(txt$, n)

Return the n leftmost characters of txt.


function right$(txt$, n)

Return the characters right of position n in txt (the oposite of left$).


function mid$(txt$, pos)

Return the character at position pos in txt.


function mid$(txt$, pos, n)

Return n characters starting at position pos in txt.


function instr(txt$, sub$)

Return the position of the first occurrence of sub in txt. -1 is returned if txt doesn't contain sub.


function instr(txt$, sub$, pos)

Same as above but start searching at position pos.


[ Back ]