Legacy Documentation

Mathematica 9 (2012)

This is documentation for Mathematica 9, which was
based on an earlier version of Wolfram Language.
View current documentation (Version 15.0)

StringToStream

StringToStream["string"]
opens an input stream for reading from a string.

DetailsDetails

ExamplesExamplesopen allclose all

Basic Examples (1)Basic Examples (1)

Convert a string to a stream:

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

Read the first number from the stream object:

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

Read the next character from the stream:

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

Close the stream:

In[4]:=
Click for copyable input
Out[4]=
New in 2
ja zh