functionrepeat

Repeat a string n times

Extends from Modelica.Icons.Function (Icon for functions).

Information

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".

Inputs

TypeNameDefaultDescription
Integern1Number of occurrences
Stringstring" "String that is repeated

Outputs

TypeNameDefaultDescription
StringrepeatedStringString containing n concatenated strings