HomeManualTopicsTypesSymbols

std_types::string/std::dup

creates a string containing n copies of the specified string

Parameters

self
the string to duplicate
n
the duplication count

Results

None

Description

The function aims to duplicate the specified string in a smart way.

Example

$str "abc" $str_x_3 dup(str 3) println! str_x_3

Output

abcabcabc

Topic

Strings

Implements

std::dup creates a concatenation of *n* copies of the specified collection

See also

std::spaces returns the specified number of spaces
std::tabs_and_spaces returns a sequence of tabulator- and space-characters