Reference Manual - Table of Contents

Execution Control
Forms and Windows
Controls
Menus
System and Desktop
Graphic Drawing Commands

Animation
QuickTime Movies
Speech
Sound
File I/O
Printing
Serial Ports

Math Functions
String Functions
Date and Time
Memory Buffers
Error Handling
Console Text Window

Events

Direct Memory Access
Direct Mouse Access
Direct Keyboard Access
Code Resource Modules

A - Runtime Error Messages
B - Compiler Error Messages

 

String Functions

Function Summary:
var = Asc ( text$ )
var$ = Chr ( numeric-expression )
var$ = Left ( text$, numOfChars )
var$ = Right ( text$, numOfChars )
var$ = Mid ( text$, startPos, numOfChars )
var$ = Lcase ( text$ )
var$ = Ucase ( text$ )
var$ = Trim ( text$ )
var$ = Ltrim ( text$ )
var$ = Rtrim ( text$ )
var$ = Str ( numeric-expression )
var$ = Str ( numeric-expression , decimalPlaces)
var$ = Space ( length )
var$ = String ( length , charCode )
var = InStr ( searchString$, stringToSearch$, startpos , caseFlag )
var = Len ( text$ )
var = Val ( text$ )
var$ = Hex ( numeric-expression )
var$ = StrRes( ResID )
var = StrResLen( ResID )

 

var = Asc( text$ )

This function returns a numeric value that is the ASCII code for the first character in the text$ string.

var$ = Chr( numeric-expression )

This function returns the a string containing an ASCII character represented by the numeric expression .

var$ = Left( text$, numOfChars )

This function returns a string that has been contains a specified number of characters( numOfChars) from the left side of the text$ string.

var$ = Right( text$, numOfChars )

This function returns a string that has been contains a specified number of characters( numOfChars) from the right side of the text$ string.

var$ = Mid( text$, startPos, numOfChars )

This function returns a string that has been contains a specified number of characters( numOfChars) from the middle of the text$ string at the designated character starting position (startPos).

var$ = Lcase( text$ )

This function returns a string that has been converted all to lowercase. The Lcase function returns the text$ with all alphabetical letters (A-Z) converted to lowercase.

var$ = Ucase( text$ )

This function returns a string that has been converted all to uppercase. The Ucase function returns the text$ with all alphabetical letters (a-z) converted to uppercase.

var$ = Trim( text$ )

This function returns a string that has all leading and trailing spaces removed. The Trim function returns the text$ with all leading and trailing spaces removed. Only the space character is affected.

var$ = Ltrim( text$ )

This function returns a string that has all leading spaces removed. Only the space character is affected.

var$ = Rtrim( text$ )

This function returns a string that has all trailing spaces removed. Only the space character is affected.

var$ = Str( numeric-expression )

This function returns a string representation of a number.

var$ = Str( numeric-expression, decimalPlaces )

This new variation of the STR function returns a string representation of a number with a designated number of decimal places.

var$ = Space( length )

This function returns a string that contains a designated number of spaces. The Space function returns a string contain the number of spaces designated by the length parameter.

var$ = String( length , charCode )

This function returns a string that is the length specified and filled with the ASCII character represented by charCode.

var = InStr( searchString$, stringToSearch, startPos, caseFlag )

This function returns a numeric value indicating the string position that the searchString is at in the stringToSearch.

var = Len( text$ )

This function returns the length of a string. The Len function returns a value representing the total length of text$.

var = Val( text$ )

This function returns the numeric value of a string. The Val function returns the numeric value represented in the text$ string. If text$ begins with all trailing spaces removed. Only the space character is affected

var$ = Hex( numeric-expression )

This function returns a string that contains the hexidecimal equivalent of the base 10 numeric-expression.

numeric-expression - This argument can be any valid numeric expression.

var$ = StrRes( ResID )

This function returns the string from a ‘STR ’ resource.

var = StrResLen( ResID )

This function returns the length of the string from a ‘STR ’ string resource.