Softanza
DémarrerEnglish
Softanza
Comment faire · Chaînes

Vérifier si une chaîne commence ou finit par quelque chose

Softanza
Q("hello world").StartsWith("hello")
#--> TRUE

Q("hello world").EndsWith("world")
#--> TRUE
Sortie
1
1

exécuté : a affiché ce que la recette promet

exécuté le 2026-10-02 22:33 dans la bibliothèque au commit 0e72e2e2c ; l'expression qui porte la promesse a été affichée pour l'exécution · La recette sur GitHub(s'ouvre dans un nouvel onglet)

Les méthodes

stzString.StartsWith · stzString.EndsWith

Voir aussi

Les mots de cette tâche : starts with, begins with, prefix, ends with, finishes with, suffix

La recette est écrite en anglais, comme la bibliothèque ; son intention est traduite ici.