Mathematica 9 is now available
 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]=



    Any questions about topics on this page? Click here to get an individual response.Buy NowMore Information
    THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
    SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.