User Tools

Site Tools


repeat_function

Differences

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

Link to this comparison view

repeat_function [2006/07/11 04:57]
127.0.0.1 external edit
repeat_function [2015/06/04 22:19] (current)
sgrubnick
Line 1: Line 1:
-# $EPIC: repeat_function.txt,​v 1.1.1.1 2006/07/11 04:57:43 jnelson Exp $ 
 ======Synopsis:​====== ======Synopsis:​======
 $__repeat__(<​count>​ <​text>​) $__repeat__(<​count>​ <​text>​)
  
-======Technical:​====== +  * This function returns ​<​count>​ instances ​of <text> joined without a separator
-This function returns ​a string composed ​of the input text concatenated +  * <​count>​ must be >1 
-to itself the specified number of times+  ​* 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>​)
-======Practical:​=====+
-This function has many potential uses.  For example, it would be used to +
-format output from a script such that it is always the width of the +
-current window.  ​This has the side bonus of removing the need to hard- +
-code formatting devices ​(table headers and such), which tend to look +
-rather messy in source code.+
  
 ======Returns:​====== ======Returns:​======
repeat_function.txt · Last modified: 2015/06/04 22:19 by sgrubnick