<doc>
  <legacy_id>1266</legacy_id>
  <name>length</name>
  <type>function</type>
  <syntax>
    <example>the length of <i>string</i></example>
    <example>length(<i>string</i>)</example>
  </syntax>
  <library></library>
  <objects>
  </objects>
  <synonyms>
    <synonym>len</synonym>
  </synonyms>
  <classification>
    <category>Text and Data Processing</category>
  </classification>
  <references>
    <property tag="number">number Property</property>
    <function tag="offset">offset Function</function>
    <operator tag="begins with">begins with Operator</operator>
    <function tag="number">number Function</function>
    <operator tag="ends with">ends with Operator</operator>
  </references>
  <history>
    <introduced version="1.0">Added.</introduced>
  </history>
  <platforms>
    <mac/>
    <windows/>
    <linux/>
    <ios/>
    <android/>
  </platforms>
  <classes>
    <desktop/>
    <server/>
    <web/>
    <mobile/>
  </classes>
  <security>
  </security>
  <summary><glossary tag="return">Returns</glossary> the number of <keyword tag="characters">characters</keyword> in a <keyword tag="string">string</keyword>.</summary>
  <examples>
    <example>the length of "ABC" <code><i>-- returns 3</i></code></example>
    <example>repeat with x = 1 to the length of receivedData</example>
    <example>put char (length(it) - 3) to (length(it)) of it into myExtension</example>
  </examples>
  <description>
    <p>Use the <b>length</b> <control_st tag="function">function</control_st> to find out how many <keyword tag="characters">characters</keyword> are in a <keyword tag="string">string</keyword>, in order to process each <keyword tag="character">character</keyword>.</p><p/><p><b>Parameters:</b></p><p>The <i>string</i> is any <keyword tag="string">string</keyword>, or an <glossary tag="expression">expression</glossary> that <glossary tag="evaluate">evaluates</glossary> to a <keyword tag="string">string</keyword>.</p><p/><p><b>Value:</b></p><p>The <b>length</b> <control_st tag="function">function</control_st> <glossary tag="return">returns</glossary> a <href tag="../glossary/nondashnegative.xml">non-negative</href> <keyword tag="integer">integer</keyword>.</p><p/><p><b>Comments:</b></p><p>The <b>length</b> of a <keyword tag="string">string</keyword> is the number of <keyword tag="characters">characters</keyword> in the <i>string</i>. The expression</p><p><code>  the length of <i>string</i></code></p><p>is equivalent t<code>o</code></p><p><code>  the number of chars in <i>string</i></code></p><p/><p>If the <i>string</i> is empty, its <b>length</b> is zero.</p>
  </description>
</doc>