<?xml version="1.0" encoding="utf-8"?>
<s1 title="Strings"><p>The following functions can be used to manipulate and retrieve string details from objects and variables. </p>
<p>These should be written in the following formats: </p>
<ul><li><p><em>variable.function(arguments)</em>, example - <em>myVar.subStr(3,2)</em> if your variable name was &quot;myVar&quot; and you wanted to use subStr() to find the 2 characters that begin 3 from the left. </p>
</li>
<li><p><em>object.function(arguments)</em>, example - <em>city.coords.split(&quot;,&quot;)</em> if you wanted to split the coordinates of your city into an array to determine the seperate x and y values using the split() function. </p>
</li>
</ul>
<p>Click each function name in the table below for more details of it, with examples. </p>
<p><strong>Functions</strong> </p>
<table><strong class="highlight"><![CDATA[]]></strong><tr><td><strong class="highlight"><![CDATA[]]></strong><p><strong>Function </strong> </p>
</td><td><strong class="highlight"><![CDATA[]]></strong><p><strong>Type</strong> </p>
</td><td><strong class="highlight"><![CDATA[]]></strong><p><strong>Description </strong> </p>
</td><td><strong class="highlight"><![CDATA[]]></strong><p> </p>
</td><td><p> </p>
</td></tr><tr><td><p><jump href="/wiki/Strings#C">CenterPad</jump> </p>
</td><td><p>String </p>
</td><td><p>Prepends and appends spaces (or specified character) to a string to form string of the desired length. </p>
</td></tr><tr><td><p><jump href="/wiki/Strings#c">charAt</jump> </p>
</td><td><p>String </p>
</td><td><p>Returns the character in the position specified by the index parameter. </p>
</td></tr><tr><td><p><jump href="/wiki/Strings#c">charCodeAt</jump> </p>
</td><td><p>Number </p>
</td><td><p>Returns the numeric Unicode character code of the character at the specified index. </p>
</td></tr><tr><td><p><jump href="/wiki/Strings#c">concat</jump> </p>
</td><td><p>String </p>
</td><td><p>Appends the supplied arguments to the end of the String object, converting them to strings if necessary, and returns the resulting string. </p>
</td></tr><tr><td><p><jump href="/wiki/Strings#f">fromCharCode</jump> </p>
</td><td><p>String </p>
</td><td><p>Returns a string comprising the characters represented by the Unicode character codes in the parameters. </p>
</td></tr><tr><td><p><jump href="/wiki/Strings#i">indexOf</jump> </p>
</td><td><p>int </p>
</td><td><p>Searches the string and returns the position of the first occurrence of val found at or after startIndex within the calling string. </p>
</td></tr><tr><td><p><jump href="/wiki/Strings#l">lastIndexOf</jump> </p>
</td><td><p>int </p>
</td><td><p>Searches the string from right to left and returns the index of the last occurrence of val found before startIndex. </p>
</td></tr><tr><td><p><jump href="/wiki/Strings#L">LeftPad</jump> </p>
</td><td><p>String </p>
</td><td><p>Prepends spaces (or specified character) to a string to form string of the desired length. </p>
</td></tr><tr><td><p><jump href="/wiki/Strings#l">localeCompare</jump> </p>
</td><td><p>int </p>
</td><td><p>Compares the sort order of two or more strings and returns the result of the comparison as an integer. </p>
</td></tr><tr><td><p><jump href="/wiki/Strings#m">match</jump> </p>
</td><td><p>Array </p>
</td><td><p>Matches the specifed pattern against the string. </p>
</td></tr><tr><td><p><jump href="/wiki/Strings#M">Merge</jump> </p>
</td><td><p>String </p>
</td><td><p>Concatenate str1 and str2 together, delim is inserted between strings if both strings are not empty </p>
</td></tr><tr><td><p><jump href="/wiki/Strings#r">replace</jump> </p>
</td><td><p>String </p>
</td><td><p>Matches the specifed pattern against the string and returns a new string in which the first match of pattern is replaced with the content specified by repl. </p>
</td></tr><tr><td><p><jump href="/wiki/Strings#R">RightPad</jump> </p>
</td><td><p>String </p>
</td><td><p>Appends spaces (or specified character) to a string to form string of the desired length. </p>
</td></tr><tr><td><p><jump href="/wiki/Strings#s">search</jump> </p>
</td><td><p>int </p>
</td><td><p>Searches for the specifed pattern and returns the index of the first matching substring. </p>
</td></tr><tr><td><p><jump href="/wiki/Strings#s">slice</jump> </p>
</td><td><p>String </p>
</td><td><p>Returns a string that includes the startIndex character and all characters up to, but not including, the endIndex character. </p>
</td></tr><tr><td><p><jump href="/wiki/Strings#s">split</jump> </p>
</td><td><p>Array </p>
</td><td><p>Splits a String object into an array of substrings by dividing it wherever the specified delimiter parameter occurs. </p>
</td></tr><tr><td><p><jump href="/wiki/Strings#S">StringRepeat</jump> </p>
</td><td><p>String </p>
</td><td><p>Makes a string consisting of spaces (or of specified string) repeated count times. </p>
</td></tr><tr><td><p><jump href="/wiki/Strings#S">StringToObject</jump> </p>
</td><td><p>String </p>
</td><td><p>Parses and converts strings with parameters into object. </p>
</td></tr><tr><td><p><jump href="/wiki/Strings#s">substr</jump> </p>
</td><td><p>String </p>
</td><td><p>Returns a substring consisting of the characters that start at the specified startIndex and with a length specified by len. </p>
</td></tr><tr><td><p><jump href="/wiki/Strings#s">substring</jump> </p>
</td><td><p>String </p>
</td><td><p>Returns a string consisting of the character specified by startIndex and all characters up to endIndex - 1. </p>
</td></tr><tr><td><p><jump href="/wiki/Strings#T">ToCSV</jump> </p>
</td><td><p>String </p>
</td><td><p>Converts arguments to comma-separated string with values enclosed in qouble quotes. </p>
</td></tr><tr><td><p><jump href="/wiki/Strings#t">toLocaleLowerCase</jump> </p>
</td><td><p>String </p>
</td><td><p>Returns a copy of this string, with all uppercase characters converted to lowercase. </p>
</td></tr><tr><td><p><jump href="/wiki/Strings#t">toLocaleUpperCase</jump> </p>
</td><td><p>String </p>
</td><td><p>Returns a copy of this string, with all lowercase characters converted to uppercase. </p>
</td></tr><tr><td><p><jump href="/wiki/Strings#t">toLowerCase</jump> </p>
</td><td><p>String </p>
</td><td><p>Returns a copy of this string, with all uppercase characters converted to lowercase. </p>
</td></tr><tr><td><p><jump href="/wiki/Strings#t">toUpperCase</jump> </p>
</td><td><p>String </p>
</td><td><p>Returns a copy of this string, with all lowercase characters converted to uppercase. </p>
</td></tr><tr><td><p><jump href="/wiki/Strings#U">Upper1</jump> </p>
</td><td><p>String </p>
</td><td><p>Upper cases the first letter of a string. </p>
</td></tr><tr><td><p><jump href="/wiki/Strings#v">valueOf</jump> </p>
</td><td><p>String </p>
</td><td><p>Returns the primitive value of a String instance. </p>
</td></tr><tr><td><p><jump href="/wiki/Strings#F">FormatMiles</jump> </p>
</td><td><p>int </p>
</td><td><p>Converts number to a string, e.g. &quot;2.34 miles&quot;. </p>
</td></tr><tr><td><p><jump href="/wiki/Strings#F">FormatNumber</jump> </p>
</td><td><p>int </p>
</td><td><p>Formats number with specified precision, e.g. &quot;2,346&quot;. </p>
</td></tr><tr><td><p><jump href="/wiki/Strings#F">FormatNumber2</jump> </p>
</td><td><p>int </p>
</td><td><p>Formats numbers with 2 decimal places, e.g. &quot;2,345.56&quot;. </p>
</td></tr><tr><td><p><jump href="/wiki/Strings#F">FormatPercent</jump> </p>
</td><td><p>int </p>
</td><td><p>Formats number as percentage, e.g. &quot;9.1%&quot;. </p>
</td></tr></table><p></p>
<s2 id="CenterPad" title="CenterPad">
<p><strong>Usage:</strong> CenterPad(str, targetLength, optional padChar = &quot; &quot;) </p>
<p>Prepends and appends spaces (or specified character) to a string to form string of the desired length. </p>
<p><strong>Example:</strong> </p>
<ul><li><p>echo CenterPad(&quot;This is a test&quot;, 25, &quot;.&quot;) </p>
</li>
</ul>
<p><strong>Result:</strong> </p>
<ul><li>.....This is a test...... </li>
</ul>
<p></p>
</s2>
<s2 id="charAt" title="charAt">
<p><strong>Usage:</strong> charAt(#) </p>
<p>Returns the character in the position specified by the index parameter. </p>
<p><strong>Example:</strong> </p>
<ul><li>// Don&apos;t forget almost all internal &quot;counting&quot; starts at 0, not at 1... </li>
<li><p>// so the 5th character would actually be 0, 1, 2, 3, <strong>4</strong> &lt;--- 4! </p>
</li>
<li>var=&quot;hello&quot; </li>
<li>echo &quot;The 5th letter in the word hello is: &quot; + var.charAt(4) </li>
</ul>
<p><strong>Result:</strong> </p>
<ul><li>The 5th letter in the word hello is: o </li>
</ul>
<p></p>
</s2>
<s2 id="charCodeAt" title="charCodeAt">
<p><strong>Usage:</strong> charCodeAt(#) </p>
<p>Returns the numeric Unicode character code of the character at the specified index. </p>
<p><strong>Example:</strong> </p>
<ul><li>var=&quot;hello&quot; </li>
<li>echo &quot;The numeric code of the 5th letter in the word hello is: &quot; + var.charCodeAt(4) </li>
</ul>
<p><strong>Result:</strong> </p>
<ul><li>The numeric code of the 5th letter in the word hello is: 111 </li>
</ul>
<p></p>
</s2>
<s2 id="concat" title="concat">
<p><strong>Usage:</strong> concat(arg1,arg2,...,argN) </p>
<p>Appends the supplied arguments to the end of the String object, converting them to strings if necessary, and returns the resulting string. </p>
<p><strong>Example:</strong> </p>
<ul><li>var=&quot;oompa&quot; </li>
<li>var2=&quot;loompa&quot; </li>
<li>var3=&quot;dance&quot; </li>
<li>echo var.concat(var2,&quot; &quot;,var3) </li>
</ul>
<p><strong>Result:</strong> </p>
<ul><li>oompaloompa dance </li>
</ul>
<p></p>
</s2>
<s2 id="fromCharCode" title="fromCharCode">
<p><strong>Usage:</strong> fromCharCode() </p>
<p>Returns a string comprising the characters represented by the Unicode character codes in the parameters. </p>
<p><strong>Example:</strong> </p>
<ul><li>echo String.fromCharCode(70) </li>
</ul>
<p><strong>Result:</strong> </p>
<ul><li>F </li>
</ul>
<p></p>
</s2>
<s2 id="indexOf" title="indexOf">
<p><strong>Usage:</strong> <jump href="/wiki/IndexOf" class="nonexistent">IndexOf</jump>() </p>
<p>Searches the string and returns the position of the first occurrence of val found at or after startIndex within the calling string. </p>
<p><strong>Example:</strong> </p>
<ul><li>string = &quot;this is a test string.&quot; </li>
<li>echo string.indexOf(&quot;test&quot;) </li>
</ul>
<p><strong>Result:</strong> </p>
<ul><li>10 </li>
</ul>
<p></p>
</s2>
<s2 id="lastIndexOf" title="lastIndexOf">
<p><strong>Usage:</strong> lastIndexOf() </p>
<p>Searches the string from right to left and returns the index of the last occurrence of val found before startIndex. </p>
<p><strong>Example:</strong> </p>
<ul><li>string = &quot;this is another test string.&quot; </li>
<li>echo string.lastIndexOf(&quot;test&quot;) </li>
</ul>
<p><strong>Result:</strong> </p>
<ul><li>16 </li>
</ul>
<p></p>
</s2>
<s2 id="LeftPad" title="LeftPad">
<p><strong>Usage:</strong> LeftPad(str, targetLength, optional padChar = &quot; &quot;) </p>
<p>Prepends spaces (or specified character) to a string to form string of the desired length. </p>
<p><strong>Example:</strong> </p>
<ul><li><p>echo LeftPad(&quot;This is a test&quot;, 25, &quot;.&quot;) </p>
</li>
</ul>
<p><strong>Result:</strong> </p>
<ul><li>...........This is a test </li>
</ul>
<p></p>
</s2>
<s2 id="localeCompare" title="localeCompare">
<p><strong>Usage:</strong> localeCompare() </p>
<p>Compares the sort order of two or more strings and returns the result of the comparison as an integer. </p>
<p><strong>Example:</strong> </p>
<ul><li>string = &quot;abc&quot; </li>
<li>echo &quot;def&quot;.localeCompare(string) </li>
</ul>
<p><strong>Result:</strong> </p>
<ul><li>3 </li>
</ul>
<p></p>
</s2>
<s2 id="match" title="match">
<p><strong>Usage:</strong> match() </p>
<p>Matches the specified pattern against the string. Usage of &quot;/g&quot; allows global search (returns multiple results if there&apos;s multiple instances). </p>
<p><strong>Example:</strong> </p>
<ul><li>string = &quot;This is just a simple test string.&quot; </li>
<li>echo string.match(/is/g) </li>
</ul>
<p><strong>Result:</strong> </p>
<ul><li>is,is </li>
</ul>
<p></p>
</s2>
<s2 id="Merge" title="Merge">
<p><strong>Usage:</strong> Merge(str1, str2, optional delim = &quot; &quot;) </p>
<p>Concatenate str1 and str2 together, delim is inserted between strings if both strings are not empty. </p>
<p><strong>Example:</strong> </p>
<ul><li>echo Merge(&quot;This is a test&quot;, &quot;of the Emergency Broadcast System&quot;) </li>
<li>echo Merge(&quot;One plus One&quot;, &quot;Two&quot;, &quot; = &quot;) </li>
</ul>
<p><strong>Result:</strong> </p>
<ul><li>This is a test of the Emergency Broadcast System </li>
<li>One plus One = Two </li>
</ul>
<p></p>
</s2>
<s2 id="RightPad" title="RightPad">
<p><strong>Usage:</strong> RightPad(str, targetLength, optional padChar = &quot; &quot;) </p>
<p>Appends spaces (or specified character) to a string to form string of the desired length. </p>
<p><strong>Example:</strong> </p>
<ul><li><p>echo RightPad(&quot;This is a test&quot;, 25, &quot;.&quot;) </p>
</li>
</ul>
<p><strong>Result:</strong> </p>
<ul><li>This is a test........... </li>
</ul>
<p></p>
</s2>
<s2 id="replace" title="replace">
<p><strong>Usage:</strong> replace( , ) </p>
<p>Matches the specified pattern against the string and returns a new string in which the first match of pattern is replaced with the content specified. </p>
<p><strong>Example:</strong> </p>
<ul><li>string = &quot;yet another test string&quot; </li>
<li>echo string.replace(&quot;test&quot;, &quot;dull test&quot;) </li>
</ul>
<p><strong>Result:</strong> </p>
<ul><li>yet another dull test string </li>
</ul>
<p></p>
</s2>
<s2 id="search" title="search">
<p><strong>Usage:</strong> search() </p>
<p>Searches for the specified pattern and returns the index of the first matching sub-string. </p>
<p><strong>Example:</strong> </p>
<ul><li>string = &quot;yet another test string&quot; </li>
<li>echo string.search(&quot;another&quot;) </li>
</ul>
<p><strong>Result:</strong> </p>
<ul><li>4 </li>
</ul>
<p></p>
</s2>
<s2 id="slice" title="slice">
<p><strong>Usage:</strong> slice( , ) </p>
<p>Returns a string that includes the startIndex character and all characters up to, but not including, the endIndex character. </p>
<p><strong>Example:</strong> </p>
<ul><li>string = &quot;Hello World!&quot; </li>
<li>echo string.slice(1,5) </li>
</ul>
<p><strong>Result:</strong> </p>
<ul><li>ello </li>
</ul>
<p></p>
</s2>
<s2 id="split" title="split">
<p><strong>Usage:</strong> split(&quot;delimiter&quot;) </p>
<p>Splits a String object into an array of substrings by dividing it wherever the specified delimiter parameter occurs. </p>
<p><strong>Example:</strong> </p>
<ul><li>mycoords=city.coords.split(&quot;,&quot;) </li>
<li>echo &quot;x:&quot; + mycoords[0] + &quot; y:&quot; + mycoords[1] </li>
</ul>
<p><strong>Result:</strong> </p>
<ul><li>x:746 y:34 </li>
</ul>
<p></p>
</s2>
<s2 id="StringRepeat" title="StringRepeat">
<p><strong>Usage:</strong> StringRepeat(count, optional str = &quot; &quot;) </p>
<p>Makes a string consisting of spaces (or of specified string) repeated count times. </p>
<p><strong>Example:</strong> </p>
<ul><li><p>echo StringRepeat(25, &quot;.&quot;) </p>
</li>
<li><p>echo StringRepeat(25, &quot;Test&quot;) </p>
</li>
<li><p>echo StringRepeat(25, &quot;Test &quot;) </p>
</li>
</ul>
<p><strong>Result:</strong> </p>
<ul><li>......................... </li>
<li><p>TestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTest </p>
</li>
<li>Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test </li>
</ul>
<p></p>
</s2>
<s2 id="StringToObject" title="StringToObject">
<p><strong>Usage:</strong> StringToObject(str, delim1, delim2, optional result = null) </p>
<p>Parses and converts strings with parameters into object. </p>
<p><strong>Example:</strong> </p>
<ul><li>str = &quot;test1:no1,test2:no2&quot; </li>
<li><p>o = StringToObject(str,&quot;,&quot;,&quot;:&quot;) </p>
</li>
<li>echo o.test2 </li>
</ul>
<p><strong>Result:</strong> </p>
<ul><li>no2 </li>
</ul>
<p></p>
</s2>
<s2 id="substr" title="substr">
<p><strong>Usage:</strong> substr(first, last) </p>
<p>Returns a substring consisting of the characters that start at the specified startIndex and with a length specified by len. </p>
<p><strong>Example:</strong> </p>
<ul><li>string = &quot;Hello World!&quot; </li>
<li>echo string.substr(1,4) </li>
</ul>
<p><strong>Result:</strong> </p>
<ul><li>ello </li>
</ul>
<p></p>
</s2>
<s2 id="substring" title="substring">
<p><strong>Usage:</strong> substring(first, last) </p>
<p>Returns a string consisting of the character specified by startIndex and all characters up to endIndex - 1. </p>
<p><strong>Example:</strong> </p>
<ul><li>string = &quot;Hello World!&quot; </li>
<li>echo string.substring(1,4) </li>
</ul>
<p><strong>Result:</strong> </p>
<ul><li>ell </li>
</ul>
<p></p>
</s2>
<s2 id="ToCSV" title="ToCSV">
<p><strong>Usage:</strong> ToCSV(...args) </p>
<p>Converts arguments to comma-separated string with values enclosedi in qouble quotes. </p>
<p><strong>Example:</strong> </p>
<ul><li>who = &quot;Bob&quot; </li>
<li>what = &quot;Cap his city&quot; </li>
<li>when = date() </li>
<li>echo ToCSV(who, what, when) </li>
</ul>
<p><strong>Result:</strong> </p>
<ul><li>&quot;Bob&quot;,&quot;Cap his city&quot;,&quot;Tue Feb 11 19:59:38 GMT-0500 2014&quot; </li>
</ul>
<p></p>
</s2>
<s2 id="toLocaleLowerCase" title="toLocaleLowerCase">
<p><strong>Usage:</strong> toLocaleLowerCase() </p>
<p>Returns a copy of this string, with all uppercase characters converted to lowercase. </p>
<p><strong>Example:</strong> </p>
<ul><li>string = &quot;tHIs Is a mEssAge.&quot; </li>
<li>echo string.toLocaleLowerCase() </li>
</ul>
<p><strong>Result:</strong> </p>
<ul><li>this is a message. </li>
</ul>
<p></p>
</s2>
<s2 id="toLocaleUpperCase" title="toLocaleUpperCase">
<p><strong>Usage:</strong> toLocaleUpperCase() </p>
<p>Returns a copy of this string, with all lowercase characters converted to uppercase. </p>
<p><strong>Example:</strong> </p>
<ul><li>string = &quot;tHIs Is a mEssAge.&quot; </li>
<li>echo string.toLocaleUpperCase() </li>
</ul>
<p><strong>Result:</strong> </p>
<ul><li>THIS IS A MESSAGE. </li>
</ul>
<p></p>
</s2>
<s2 id="toLowerCase" title="toLowerCase">
<p><strong>Usage:</strong> toLowerCase() </p>
<p>Returns a copy of this string, with all uppercase characters converted to lowercase. </p>
<p><strong>Example:</strong> </p>
<ul><li>string = &quot;tHIs Is a mEssAge.&quot; </li>
<li>echo string.toLowerCase() </li>
</ul>
<p><strong>Result:</strong> </p>
<ul><li>this is a message. </li>
</ul>
<p></p>
</s2>
<s2 id="toUpperCase" title="toUpperCase">
<p><strong>Usage:</strong> </p>
<p>Returns a copy of this string, with all lowercase characters converted to uppercase. </p>
<p><strong>Example:</strong> </p>
<ul><li>string = &quot;tHIs Is a mEssAge.&quot; </li>
<li>echo string.toupperCase() </li>
</ul>
<p><strong>Result:</strong> </p>
<ul><li>THIS IS A MESSAGE. </li>
</ul>
<p></p>
</s2>
<s2 id="Upper1" title="Upper1">
<p><strong>Usage:</strong> Upper1(str) </p>
<p>Upper cases the first letter of a string. </p>
<p><strong>Example:</strong> </p>
<ul><li>echo Upper1(&quot;testing&quot;) </li>
</ul>
<p><strong>Result:</strong> </p>
<ul><li>Testing </li>
</ul>
<p></p>
</s2>
<s2 id="valueOf" title="valueOf">
<p><strong>Usage:</strong> valueOf() </p>
<p>Returns the primitive value of a String instance. </p>
<p><strong>Example:</strong> </p>
<ul><li>string = &quot;this is a message.&quot; </li>
<li>echo string.valueOf() </li>
</ul>
<p><strong>Result:</strong> </p>
<ul><li>this is a message. </li>
</ul>
<p></p>
</s2>
<s2 id="FormatMiles" title="FormatMiles">
<p><strong>Usage:</strong> FormatMiles(number) </p>
<p>Converts number to a string like &quot;2.34 miles&quot;. </p>
<p><strong>Example:</strong> </p>
<ul><li><p>echo FormatMiles(123) </p>
</li>
<li><p>echo FormatMiles(123.4) </p>
</li>
</ul>
<p><strong>Result:</strong> </p>
<ul><li>123.00 miles </li>
<li>123.40 miles </li>
</ul>
<p></p>
</s2>
<s2 id="FormatNumber" title="FormatNumber">
<p><strong>Usage:</strong> FormatNumber(number, optional precision = 0, optional useThousandsSeparator = true) </p>
<p>Formats number with specified precision. Default has no decimal places, e.g. &quot;2,346&quot; </p>
<p><strong>Example:</strong> </p>
<ul><li><p>echo FormatNumber(&quot;1234567&quot;) </p>
</li>
<li><p>echo FormatNumber(&quot;1234567&quot;,&quot;2&quot;) </p>
</li>
</ul>
<p><strong>Result:</strong> </p>
<ul><li>1,234,567 </li>
<li>1,234,567.00 </li>
</ul>
<p></p>
</s2>
<s2 id="FormatNumber2" title="FormatNumber2">
<p><strong>Usage:</strong> FormatNumber2(number, optional precision = 0, optional useThousandsSeparator = true) </p>
<p>Formats number with 2 decimal places, e.g. &quot;2,345.56&quot;. </p>
<p><strong>Example:</strong> </p>
<ul><li><p>echo FormatNumber2(&quot;1234567&quot;) </p>
</li>
</ul>
<p><strong>Result:</strong> </p>
<ul><li>1,234,567.00 </li>
</ul>
<p></p>
</s2>
<s2 id="FormatPercent" title="FormatPercent">
<p><strong>Usage:</strong> FormatPercent(number, optional presision = 1) </p>
<p>Formats number as percentage. </p>
<p><strong>Example:</strong> </p>
<ul><li><p>echo FormatPercent(&quot;1&quot;) </p>
</li>
<li><p>echo FormatPercent(&quot;0.25&quot;,&quot;0&quot;) </p>
</li>
<li><p>echo FormatPercent(&quot;0.25&quot;,&quot;2&quot;) </p>
</li>
</ul>
<p><strong>Result:</strong> </p>
<ul><li>100.0% </li>
<li>25% </li>
<li>25.00% </li>
</ul>
<p></p>

<br/>------------------------------------------------------------------------------<br/>
<p> <jump href="/wiki/CategoryFunctions">CategoryFunctions</jump> </p>
</s2></s1>