StringRepeat

StringRepeat["str",n]

creates a string consisting of "str" repeated n times.

StringRepeat["str",n,max]

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

Details

Examples

open allclose all

Basic Examples  (2)

Create a string of 50 a's:

Repeat a triplet of characters 10 times:

Truncate after a fixed length:

Scope  (1)

Build a repeated biomolecular sequence:

Neat Examples  (1)

"Create" a telomere:

Wolfram Research (2015), StringRepeat, Wolfram Language function, https://reference.wolfram.com/language/ref/StringRepeat.html (updated 2020).

Text

Wolfram Research (2015), StringRepeat, Wolfram Language function, https://reference.wolfram.com/language/ref/StringRepeat.html (updated 2020).

CMS

Wolfram Language. 2015. "StringRepeat." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2020. https://reference.wolfram.com/language/ref/StringRepeat.html.

APA

Wolfram Language. (2015). StringRepeat. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/StringRepeat.html

BibTeX

@misc{reference.wolfram_2024_stringrepeat, author="Wolfram Research", title="{StringRepeat}", year="2020", howpublished="\url{https://reference.wolfram.com/language/ref/StringRepeat.html}", note=[Accessed: 18-December-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_stringrepeat, organization={Wolfram Research}, title={StringRepeat}, year={2020}, url={https://reference.wolfram.com/language/ref/StringRepeat.html}, note=[Accessed: 18-December-2024 ]}