<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.multitheftauto.com/wiki/DgsEditReplaceText?action=history&amp;feed=atom</id>
	<title>DgsEditReplaceText - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.multitheftauto.com/wiki/DgsEditReplaceText?action=history&amp;feed=atom"/>
	<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=DgsEditReplaceText&amp;action=history"/>
	<updated>2026-05-07T00:05:04Z</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=DgsEditReplaceText&amp;diff=61912&amp;oldid=prev</id>
		<title>Thisdp: Created page with &quot;__NOTOC__  {{Client function}} This function replaces a part of text from the edit by index.  ==Syntax==  &lt;syntaxhighlight lang=&quot;lua&quot;&gt; bool dgsEditReplaceText ( element theEle...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=DgsEditReplaceText&amp;diff=61912&amp;oldid=prev"/>
		<updated>2019-01-10T14:23:59Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;__NOTOC__  {{Client function}} This function replaces a part of text from the edit by index.  ==Syntax==  &amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt; bool dgsEditReplaceText ( element theEle...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Client function}}&lt;br /&gt;
This function replaces a part of text from the edit by index.&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool dgsEditReplaceText ( element theElement, int startIndex, int endIndex, string text [, bool noAffectCaret = false ] )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''theElement:''' The edit to be changed.&lt;br /&gt;
*'''startIndex:''' An integer indicated where the text of the edit is selected from ( start from 0 ).&lt;br /&gt;
*'''endIndex:''' An integer indicated where the text of the edit is selected to ( start from 0 ).&lt;br /&gt;
*'''text:''' A string used to replace.&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments===&lt;br /&gt;
*'''noAffectCaret:''' A bool indicated whether this operation will affect the position of caret.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if the text was successfully replaced, ''false'' otherwise.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
DGS = exports.dgs&lt;br /&gt;
edit = DGS:dgsCreateEdit(500,200,200,300,&amp;quot;This is a dgs-dxedit&amp;quot;,false)&lt;br /&gt;
setTimer(function()&lt;br /&gt;
	DGS:dgsEditReplaceText(edit,0,6,&amp;quot;I am&amp;quot;)&lt;br /&gt;
end,500,10)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{DGSFUNCTIONS}}&lt;/div&gt;</summary>
		<author><name>Thisdp</name></author>
	</entry>
</feed>