Mathematica > Core Language > String Manipulation > String Operations > StringDrop >

StringDrop

StringDrop
gives with its first n characters dropped.
StringDrop
gives with its last n characters dropped.
StringDrop
gives with its n^(th) character dropped.
StringDrop
gives with characters m through n dropped.
StringDrop
gives the list of results for each of the .
  • StringDrop drops characters m through n in steps of s.
  • StringDrop uses the standard Mathematica sequence specification.
Drop the first 4 characters from a string:
Use InputForm to show quotes:
Drop from the end of the string:
Drop characters 5 through 10:
Drop the first 4 characters from a string:
In[1]:=
Click for copyable input
Out[1]=
Use InputForm to show quotes:
In[2]:=
Click for copyable input
Out[2]//InputForm=
 
Drop from the end of the string:
In[1]:=
Click for copyable input
Out[1]=
 
Drop characters 5 through 10:
In[1]:=
Click for copyable input
Out[1]=
Drop character 3 from a string:
Drop every other character:
Drop the last 2 characters from several strings:
StringDrop works with special characters:
Newline () counts as a single character:
StringDrop works like applying Drop to the list of characters:
StringReplacePart with an empty string can be used like StringDrop:
StringReplacePart can drop several sequences of characters at a time:
StringDrop operates on the raw characters in a string:
New in 2 | Last modified in 5.1
Ask a question about this page  |  Suggest an improvement  |  Leave a message for the team
Format:   HTML  |  CDF