Crestron SIMPL+ Reference Manual page 238

Language reference guide
Hide thumbs Also See for SIMPL+:
Table of Contents

Advertisement

Software
®
228
SIMPL+
Remove
Name:
Remove
Syntax:
STRING Remove(STRING DELIMITER, STRING SOURCESTRING
[, INTEGER POSITION]);
Description:
Begins searching a string <source> for the <delimiter> at the specified position, then
removes all characters from the beginning of the string <source> up to and including
the delimiter. Returns a string containing all of the removed characters.
Parameters:
DELIMITER is a string containing the string to match for.
Search within the string, SOURCESTRING is the string to search within.
POSITION is an optional integer which specifies how many characters into
SOURCESTRING to start. It defaults to 1, which is the first character of
SOURCESTRING.
Return Value:
If the specified DELIMITER is found, the contents of the source string, up to and
including the delimiter are returned. The original source string is modified.
Example:
BUFFER_INPUT SOURCE$[50];
STRING OUTPUT$[50];
CHANGE SOURCE$
{
OUTPUT$ = REMOVE("abc", SOURCE$);
}
In this example, if SOURCE$ were "testabc123", then OUTPUT$ would be "testabc"
and SOURCE$ would contain "123".
BUFFER_INPUT SOURCE$[50];
STRING OUTPUT$[50];
CHANGE SOURCE$
{
OUTPUT$ = REMOVE("abc", SOURCE$, 6);
}
If SOURCE$ were "testabcabc123", then OUTPUT$ would be "testabcabc" and
SOURCE$ would contain "123".
Version:
SIMPL+ Version 2.00
Crestron SIMPL+
Language Reference Guide - DOC. 5797G
®

Advertisement

Table of Contents
loading

Table of Contents