Home > Contents > Index >
BEGINS
Determines whether a string starts with the specified substring.
Syntax
<BEGINS STR="STRING_VALUE" WHAT="BEGINSTRING_VALUE"/>Parameters
STR (required)
- String to search.
WHAT (required)
- Value of the string to search for within the value for
STRING_VALUE
.
Description
The
BEGINS
tag determines whether a string starts with the specified substring. The comparison is case-sensitive. For more information about variables, see the Sites Developer's Guide.Error Numbers
The possible values of
errno
include:
Value Description 1 Comparison is true. 0 Comparison is false.Example
This example determines whether the value of the variable
teststr
begins with the string"hello"
. It displays"yes"
if the comparison is true and"no"
if the comparison is false:<SETVAR NAME="errno" VALUE="0"/> <SETVAR NAME="teststr" VALUE="hello world"/> <BEGINS STR="Variables.teststr" WHAT="hello"/> <IF COND="Variables.errno=1"> <THEN> yes </THEN> <ELSE> no </ELSE> </IF>See Also
Home > Contents > Index > Oracle XML Tag Reference
Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.