endsWith

checks if string ends with pattern.

📝 Syntaxe

  • tf = endsWith(str, pattern)

  • tf = endsWith(str, pattern,'IgnoreCase', true)

  • tf = endsWith(str, pattern,'IgnoreCase', false)

📥 Argument d'entrée

  • str - une chaîne, un tableau de chaînes ou une cellule de chaînes.

  • pattern - une chaîne à rechercher.

📤 Argument de sortie

  • tf - une matrice de booléens.

📄 Description

endsWith renvoie vrai si str se termine par pattern.

💡 Exemple


str = 'To make a mountain out of a molehill';
k = endsWith (str, 'hill')
k = endsWith (str, 'molehill')
k = endsWith (str, 'Hill', 'IgnoreCase', true)

A = {'Nel', 'son'; 'Nelson', 'Modules'}
k = endsWith(A, 'son')

A = ["Nel", "son"; "Nelson", "Modules"]
k = endsWith(A, "son")

🔗 Voir aussi

startsWith, contains.

🕔 Historique

Version
📄 Description

1.0.0

version initiale

Last updated

Was this helpful?