STR_STARTS_WITH
Script Function: Checks whether a string starts with a certain other string.
Syntax
STR_STARTS_WITH (String1, String2)
Syntax |
Description/Format |
---|---|
String1 |
The string that should be checked. |
String2 | The string that is used for checking string1. Format: script literal or script variable |
Return Codes |
---|
"Y" = String1 starts with string2 |
This script element checks whether the beginning of a certain string complies with another string. Note that you must specify the string that should be checked (parameter String1) and the string that should be used for checking the required beginning (String2).
Note: This script function will also supply "Y" when String1 and String2 are identical.
Warning! Note that this comparison is case sensitive.
Examples
:SET &CHECK# = STR_STARTS_WITH(&VAR#,"Docu")
:IF &CHECK# EQ "Y"
: P "Object title starts with 'Docu'"
:ENDIF
See also: