User Guide
498 CFML Language Reference
RepeatString
Returns a string created from string being repeated a specified number of times.
See also CJustify, LJustify, and RJustify.
Syntax RepeatString(
string
,
count
)
string
String being repeated.
count
Number of repeats.
Examples <!--- This example shows RepeatString --->
<HTML>
<HEAD>
<TITLE>
RepeatString Example
</TITLE>
</HEAD>
<BODY BGCOLOR=silver>
<H3>RepeatString Example</H3>
<P>RepeatString returns a string created from
<I>string</I> being repeated a specified number
of times.
<UL>
<LI>RepeatString("-", 10): <CFOUTPUT>#RepeatString("-", 10)#
</CFOUTPUT>
<LI>RepeatString("<BR>", 3): <CFOUTPUT>#RepeatString("<BR>",
3)#</CFOUTPUT>
<LI>RepeatString("", 5): <CFOUTPUT>#RepeatString("", 5)#</CFOUTPUT>
<LI>RepeatString("abc", 0): <CFOUTPUT>#RepeatString("abc", 0)#
</CFOUTPUT>
<LI>RepeatString("Lorem Ipsum", 2):
<CFOUTPUT>#RepeatString("Lorem Ipsum", 2)#</CFOUTPUT>
</UL>
</BODY>
</HTML>