String functions

ASC(X$)

Returns ASCII code of first character in string

CHR$(N)

Returns character for specified ASCII code value.

A$ = CHR$(93)

INKEY$

Checks keyboard and returns key being pressed.

INSTR(N,X$,Y$)

Searches for first occurrence of target string at a position (N). Returns position of match.

P = INSTR(8,A$,"TED")

LEFT$(X$,N)

Returns the first N characters of string X$.

B$ = LEFT(A$,9)

LEN(X$)

Returns the length of string X$.

K = LEN(K$)

MID$(X$,N,M)

Returns substring of X$ of length M, starting from position N.

B$ = MID$(A$,4,1)

RIGHT(X$,N)

Return the last N characters of string X$.

B$ = RIGHT(A$,9)

STR$(N)

Converts N to its string representation.

X$ = STR$(14.4)

VAL(X$)

Converts numeric characters of X$ to a number.

P = VAL(D$)