HP (Hewlett-Packard) NW280AAABA Calculator User Manual


 
Programming 533
RIGHT Syntax: right(str,n)
Returns the last n characters of string str. If n <= 0, returns
empty string. If n > –dim(str), returns str
Example: right("MOMOGUMBO",5) returns
"GUMBO"
MID Syntax: mid(str,pos, [n])
Extracts n characters from string str starting at index pos.
n is optional, if not specified, extracts all the remainder of
the string.
Example: mid("MOMOGUMBO",3,5) returns
"MOGUM", mid("PUDGE",4) returns "GE"
ROTATE Syntax: rotate(str,n)
Permutation of characters in string str. If 0 <=n < dim(str),
shifts n places to left. If –dim(str) < n <= –1, shifts n spaces
to right. If n > dim(str) or n < -dim(str), returns str.
Examples:
rotate("12345",2) returns "34512"
rotate("12345",-1) returns "51234"
rotate("12345",6) returns "12345"
STRINGFROMID Syntax: STRINGFROMID(integer)
Returns, in the current language, the built-in string
associated in the internal string table with the specified
integer.
Examples:
STRINGFROMID(56) returns “Complex”
STRINGFROMID(202) returns “Home Vars”
REPLACE Syntax: REPLACE(object
1
, start, object
2
)
Replaces part of object
1
with object
2
beginning at start.
The objects can be matrices, vectors, or stings.
Example:
REPLACE("12345",3,”99”) returns "12995"