Site Tools


repeat_function

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

repeat_function [2015/06/04 22:19] (current)
Line 1: Line 1:
 +======Synopsis:​======
 +$__repeat__(<​count>​ <​text>​)
 +
 +  * This function returns <​count>​ instances of <​text>​ joined without a separator.
 +  * <​count>​ must be >= 1
 +  * The return string is truncated to 1MB to avoid shooting yourself in the foot.
 +  * The <​text>​ must NOT be surrounded by double quotes. ​ If you need to repeat the space, use $__repeat__(<​count><​space><​space>​)
 +
 +======Returns:​======
 +input string repeated count times
 +
 +======Examples:​======
 +<​file>​
 +$repeat(5 hello) ​                  ​returns "​hellohellohellohellohello"​
 +$repeat(5 ​ )                       ​returns " ​    " ​ (spaces)
 +</​file>​
 +
  
repeat_function.txt ยท Last modified: 2015/06/04 22:19 (external edit)