string.startsWith

This function returns whether a string begins with another string.

Syntax

string.startsWith(str, substr)

Arguments

Argument

Type

Description

str

string

Source string

substr

string

Substring to be searched for at the beginning of the source string

Returns

Type

Description

boolean

  • True: if the substring is found at the beginning of the source string
  • False: if the substring is not found at the beginning of the source string

Examples

The function string.startsWith("Project Flogo®", "Project") returns true.