startWith

Renvoie « true » si le deuxième paramètre est un préfixe du premier.

Catégorie

Chaîne

Syntaxe de la fonction

startWith(<parameters>)

Paramètres

Paramètre Type
chaîne chaîne
préfixe chaîne

Signature et type renvoyé

startWith(<string>,<string>)

Renvoie une valeur booléenne.

Exemple

startWith("Hello World", "Hello")

Renvoie true.

startWith("Hello World", "World")

Renvoie false.

Sur cette page