<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.multitheftauto.com/wiki/String.repetition?action=history&amp;feed=atom</id>
	<title>String.repetition - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.multitheftauto.com/wiki/String.repetition?action=history&amp;feed=atom"/>
	<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=String.repetition&amp;action=history"/>
	<updated>2026-05-17T03:59:15Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.3</generator>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=String.repetition&amp;diff=79511&amp;oldid=prev</id>
		<title>Tracer: Moved string.repeat to string.repetition due to syntax issues</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=String.repetition&amp;diff=79511&amp;oldid=prev"/>
		<updated>2024-06-06T08:21:21Z</updated>

		<summary type="html">&lt;p&gt;Moved string.repeat to string.repetition due to syntax issues&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Useful Function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function repeats a substring n times.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
string string.repetition ( string what, int n )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
* '''what''': String you want to repeat&lt;br /&gt;
* '''n''': Number of times you want the string to repeat&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns repeated string&lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Shared script&amp;quot; class=&amp;quot;both&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function string.repetition(what, n)&lt;br /&gt;
    local out = ''&lt;br /&gt;
    for i=1, n do&lt;br /&gt;
        out = out..what&lt;br /&gt;
    end&lt;br /&gt;
    return out&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Shared script&amp;quot; class=&amp;quot;both&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
iprint('//'..string.repetition('*',14)..'\\')&lt;br /&gt;
iprint('||'..string.repetition('*',4)..' Test '..string.repetition('*',4)..'||')&lt;br /&gt;
iprint('\\'..string.repetition('*',14)..'//')&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Author: Tracer&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Useful_Functions}}&lt;/div&gt;</summary>
		<author><name>Tracer</name></author>
	</entry>
</feed>