RosettaCodeData/Task/Repeat-a-string/PL-I/repeat-a-string.pli

12 lines
212 B
Plaintext

/* To repeat a string a variable number of times: */
s = repeat('ha', 4);
/* or */
s = copy('ha', 5);
/* To repeat a single character a fixed number of times: */
s = (5)'h'; /* asigns 'hhhhh' to s. */