Mathematica 9 is now available
 Documentation / Mathematica / Built-in Functions / Programming / String Manipulation  /
StringDrop

  • StringDrop[" string ", n ] gives " string " with its first n characters dropped.
  • StringDrop[" string ", - n ] gives " string " with its last n characters dropped.
  • StringDrop[" string ", n ] gives " string " with its n character dropped.
  • StringDrop[" string ", m , n ] gives " string " with characters m through n dropped.
  • StringDrop uses the standard sequence specification (see Section A.3.5).
  • Example: StringDrop["abcdefgh", 2].
  • See the Mathematica book: Section 2.7.2.
  • See also: Drop, StringTake, StringPosition, StringReplacePart.

    Further Examples

    This deletes the first six characters from this string.

    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.