repeat

Repeat a string n times

Information

This information is part of the Modelica Standard Library maintained by the Modelica Association.

Syntax

string2 = Strings.repeat(n);
string2 = Strings.repeat(n, string=" ");

Description

The first form returns a string consisting of n blanks.

The second form returns a string consisting of n substrings defined by the optional argument "string".

Syntax

repeatedString = repeat(n, string)

Inputs (2)

n

Default Value: 1

Type: Integer

Description: Number of occurrences

string

Default Value: " "

Type: String

Description: String that is repeated

Outputs (1)

repeatedString

Type: String

Description: String containing n concatenated strings