WordCount

WordCount["string"]

gives the total number of words in string.

Details

  • Character sequences in "string" that are not identified as being part of words are excluded from WordCount.

Examples

open allclose all

Basic Examples  (1)

Count the number of words in a string:

In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]=

Properties & Relations  (2)

Neat Examples  (1)

See Also

TextWords  WordCounts  Count  CharacterCounts  LetterCounts

Introduced in 2015
(10.1)