Skip to content
Reference > Methods

strStartsWith(text,toFind,ignoreCase)

Definition

Boolean strStartsWith(String text, String toFind, Boolean ignoreCase)

Description

Returns true if text starts with toFind, false otherwise.

Parameter Definition

Name Type Description
text String The base string to text
toFind String the substring to find at start of text
ignoreCase Boolean Should the text be case sensitive

Examples

1
2
3
4
Boolean r1 = strStartsWith("what,now","WHAT",true); // r1 == true
Boolean r2 = strStartsWith("what,now","WHAT",false); // r2 == false
Boolean r3 = strStartsWith("what,now","where",false); // r3 == false
Boolean r4 = strStartsWith("what,now",null,false); // r4 == false