This is documentation for Mathematica 3, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.2)
 Documentation / Mathematica / Built-in Functions / Programming / String Manipulation  /
StringLength

  • StringLength[" string "] gives the number of characters in a string.
  • Example: StringLength["tiger"].
  • StringLength counts special characters such as as single characters, even if their full names involve many characters.
  • See the Mathematica book: Section 2.7.2.
  • See also: Length, Characters.

    Further Examples

    Punctuation is counted as well as letters.

    In[1]:=

    Out[1]=