wc

Syntax

wc(X)

Arguments

X is a string scalar/vector.

Details

Count the words in X.

Examples

wc(`apple);
// output
1

wc("This is a 7th generation iphone!");
// output
6

wc("This is a 7th generation iphone!" "I wonder what the 8th generation looks like");
// output
[6,8]