此为 Mathematica 4 文档,内容基于更早版本的 Wolfram 语言
查看最新文档(版本11.1)

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]=