</head> <body> <h1>StringTrimLeft / StringTrimRight</h1> <p>Removes a number of characters from the left or right-hand side of a string.</p> <p class="warning"><strong>Deprecated:</strong> These commands are not recommended for use in new scripts. Use the <a href="SubStr.htm">SubStr</a> function instead.</p> <pre class="Syntax"> <span class="func">StringTrimLeft</span>, OutputVar, InputVar, Count <span class="func">StringTrimRight</span>, OutputVar, InputVar, Count </pre> <h2 id="Parameters">Parâmetros</h2> <dl> <dt>OutputVar</dt> <dd><p>The name of the output variable in which to store the shortened version of <em>InputVar</em>.</p></dd> <dt>InputVar</dt> <dd><p>The name of the input variable whose contents will be read from. Do not enclose the name in percent signs unless you want the <em>contents</em> of the variable to be used as the name.</p></dd> <dt>Count</dt> <dd><p>The number of characters to remove, which can be an <a href="../Variables.htm#Expressions">expression</a>. If <em>Count</em> is less than or equal to zero, <em>OutputVar</em> will be set equal to the entirety of <em>InputVar</em>. If <em>Count</em> exceeds the length of <em>InputVar</em>, <em>OutputVar</em> will be made empty (blank).</p></dd> </dl> <h2 id="Remarks">Remarks</h2> <p>For this and all other commands, <em>OutputVar</em> is allowed to be the same variable as an <em>InputVar</em>.</p> <h2 id="Related">Tópicos relacionados</h2> <p><a href="SubStr.htm">SubStr()</a>, <a href="StringMid.htm">StringMid</a>, <a href="StringLeft.htm">StringLeft</a>, <a href="StringLeft.htm">StringRight</a>, <a href="IfInString.htm">IfInString</a>, <a href="StringGetPos.htm">StringGetPos</a>, <a href="StringLen.htm">StringLen</a>, <a href="StringLower.htm">StringLower</a>, <a href="StringLower.htm">StringUpper</a>, <a href="StringReplace.htm">StringReplace</a></p> <h2 id="Examples">Exemplos</h2> <div class="ex" id="ExLeft"> <p><a class="ex_number" href="#ExLeft"></a> Removes 5 characters from the left side and stores the string "is a test." in <var>OutputVar</var>.</p> <pre>String := "This is a test." StringTrimLeft, OutputVar, String, 5</pre> </div> <div class="ex" id="ExRight"> <p><a class="ex_number" href="#ExRight"></a> Removes 6 characters from the right side and stores the string "This is a" in <var>OutputVar</var>.</p> <pre>String := "This is a test." StringTrimRight, OutputVar, String, 6</pre> </div> </body> </html>