count

Computes the number of occurrences of an pattern.

📝 Syntax

  • nbocc = count(str, pattern)

  • nbocc = count(str, pattern,'IgnoreCase', true)

  • nbocc = count(str, pattern,'IgnoreCase', false)

📥 Input argument

  • str - a string, string array or cell of strings.

  • pattern - a string or string array or cell of strings to find.

📤 Output argument

  • nbocc - a matrix of integer values.

📄 Description

count computes the number of occurrences of an pattern.

💡 Example

🔗 See also

startsWith, endsWith, contains.

🕔 History

Version
📄 Description

1.0.0

initial version

Last updated

Was this helpful?