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)

StringRepeat

StringRepeat["str",n]
creates a string consisting of repeated n times.

StringRepeat["str",n,max]
creates a string consisting of up to n copies of , truncated to be of maximum total length at most max.

ExamplesExamplesopen allclose all

Basic Examples  (2)Basic Examples  (2)

Create a string of 50 a's:

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

Repeat a triplet of characters 10 times:

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

Truncate after a fixed length:

In[1]:=
Click for copyable input
Out[1]=
Introduced in 2015
(10.1)