7 string functions, String functions – Campbell Scientific RTMC Pro Real-Time Monitor and Control Professional Software User Manual

Page 31

Advertising
background image

RTMC Pro

SelectSwitch

Iterates through the set of predicates and values
in the order in which these are specified in its
arguments list. It will return the value associated
with the first predicate that specifies a non-zero
integer value. If no asserting predicate can be
found, the function will return the default_value.

XOR(x)

Performs a logical exclusion on two numbers.

2.4.7 String Functions

The following functions can be used to manipulate strings. See the online help
for information about the parameters required for each function.

Function

Description

Hex

Returns a hexadecimal string representation of an
expression.

HexToDec

Converts a hexadecimal string to a float or
integer.

InStr

Finds the location of a string within a string.

InStrRev

Finds the location of a string within a string.
(Differs from InStr in that it searches from the
end of the string rather than from the start of the
string.)

Left

Returns a substring that is a defined number of
characters from the left side of the original string.

Len

Returns the number of bytes in a string.

LTrim

Returns a copy of a string with no leading spaces.

Mid

Returns a substring that is within a string.

Replace

Used to search a string for a substring, and
replace that substring with a different string.

Right

Returns a substring that is a defined number of
characters from the right side of the original
string.

RTrim

Returns a copy of a string with no trailing spaces.

Space

Returns a string value that is filled with a defined
number of spaces

StrComp

Compares two strings by subtracting the
characters in one string from the characters in
another.

StrReverse

Returns a copy of a string with the characters in
reverse order.

Trim

Returns a copy of a string with no leading or
trailing spaces.

25

Advertising