startWith startWith

Retornará true se o segundo parâmetro for um prefixo do primeiro.

Categoria

String

Sintaxe da função

startWith(<parameters>)

Parâmetros

Parâmetro
Tipo
string
string
prefixo
string

Assinatura e tipo retornado

startWith(<string>,<string>)

Retornar um booleano.

Exemplo

startWith("Hello World", "Hello")

Retorna verdadeiro.

startWith("Hello World", "World")

Retorna falso.

recommendation-more-help
4f4a00c1-77c9-4eee-84df-bbe6206c3ab9