startWith

Returns true if the second parameter is a prefix of the first one.

Category

String

Function syntax

startWith(<parameters>)

Parameters

Parameter Type
string string
prefix string

Signature and returned type

startWith(<string>,<string>)

Return a boolean.

Example

startWith("Hello World", "Hello")

Returns true.

startWith("Hello World", "World")

Returns false.

On this page

Adobe Summit Banner

A virtual event April 27-28.

Expand your skills and get inspired.

Register for free
Adobe Summit Banner

A virtual event April 27-28.

Expand your skills and get inspired.

Register for free