str_repeat()
function str_repeat(string $string, int $times): string
Repeats a string a given number of times.
Parameters:
$string(string)$times(int)
Returns: string
Availability
- Compiled (AOT): supported by the Elephc code generator.
eval()(magician interpreter): supported — declarative interpreter builtin (crates/elephc-magician/src/interpreter/builtins/string/str_repeat.rs).
No examples yet — check examples/ and showcases/ for usage patterns.
Internals
For how str_repeat is implemented in the compiler, see the internals page.