1Prelude.rep(3kaya) Kaya module reference Prelude.rep(3kaya)
2
3
4
6 Prelude::rep - Repeat a string
7
9 String rep( String str, Int x )
10
12 str The string to repeat
13
14 x The number of times to repeat it
15
17 Return the string str repeated x times.
18
19
20 str = "Abc";
21 r = rep(str,4); // "AbcAbcAbcAbc"
22 r = rep(str,1); // "Abc"
23 r = rep(str,0); // ""
24
25 A negative or zero x will return the empty string
26
28 Kaya standard library by Edwin Brady, Chris Morris and others
29 (kaya@kayalang.org). For further information see http://kayalang.org/
30
32 The Kaya standard library is free software; you can redistribute it
33 and/or modify it under the terms of the GNU Lesser General Public
34 License (version 2.1 or any later version) as published by the Free
35 Software Foundation.
36
37
38
39Kaya December 2010 Prelude.rep(3kaya)