Wolfram Language & System 10.3 (2015)|Legacy Documentation

This is documentation for an earlier version of the Wolfram Language.View current documentation (Version 11.2)

Snippet

Snippet[doc]
gives a snippet of text from a document or other content object.

Snippet[doc,n]
gives a snippet about n lines long.

Details and OptionsDetails and Options

  • The default value for n is 1.

ExamplesExamplesopen allclose all

Basic Examples  (1)Basic Examples  (1)

Show a snippet of text contained in a ContentObject:

Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]=

Show only the first 3 lines:

In[3]:=
Click for copyable input
Out[3]=

Note that for ContentObject there is an equivalent form:

In[4]:=
Click for copyable input
Out[4]=
Introduced in 2015
(10.2)