Mathematica 9 is now available

StringDrop

Usage

StringDrop["string", n] 返回前n个字符被删除后的 "string".
StringDrop["string", -n] 返回后n个字符被删除后的 "string".
StringDrop["string",  n ] 返回第n个字符被删除后的 "string".
StringDrop["string",  m, n ] 返回从mn的字符被删除后的 "string".


Notes

StringDrop 使用标准序列指定(参见A.3.5节).
• 例如: StringDrop["abcdefgh", 2]LongRightArrow .
StringDrop["string",  m, n, s ] 以步长s删除从mn的字符.
• 参见 Mathematica 全书: 2.7.2节.
Further Examples

This deletes the first  characters from this string.

In[1]:=  

Out[1]=

This deletes the last  characters.

In[2]:=  

Out[2]=

This deletes the character at position  .

In[3]:=  

Out[3]=

This deletes characters  through  .

In[4]:=  

Out[4]=

This deletes characters  through  in steps of  .

In[5]:=  

Out[5]=



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.