BrightSign BrightScript 2 Reference Guide User Manual

Page 39

Advertising
background image

39

Mid (s As String, p As Integer, [n As Integer]) As String

Returns a substring of s with length n and starting at position p. n may be omitted, in
which case the string starting at p and ending at the end of the string is returned. The first
character in the string is poison 1. Example:

print mid(“timothy”, 4,3) „prints oth

Right (s As String, n As Integer) As String

Returns the last n characters of string. Example:

right$(st$,4) returns the last 4 characters of st$.

Str (value As Float) As String

Stri(value as Integer) As String

Converts a value to a string. STR$(A), for example, returns a string equal to the character
representation of the value of A. For example, if A=58.5, then STR$(A) equals the string
" 58.5". (Note that a leading blank is inserted before "58.5" to allow for the sign of A).

String (n As Integer, character As String ) As String

Stringi (n As Integer, character As Integer) As String

Returns a string composed of n character-symbols. For example,

string(30,"*")
returns "******************************"

Val (s As String) As Float

Performs the inverse of the STR function: returns the number represented by the
characters in a string argument. For example, if A$="12" and B$="34" then VAL(A$+
"."+B$) returns the number 12.34.

Advertising