<?xml version="1.0" encoding="UTF-8"?><api:function-page xml:base="/apidoc/8.0/fn.stringLength.xml" generated="2015-10-07T16:36:00.016766-07:00" mode="javascript" xmlns:api="http://marklogic.com/rundmc/api"><api:function-name>fn.stringLength</api:function-name><api:suggest>fn.stringlength</api:suggest><api:suggest>fn</api:suggest><api:suggest>stringlength</api:suggest><api:function-link mode="xquery" fullname="fn:string-length">/apidoc/8.0/fn:string-length.xml</api:function-link><api:function mode="javascript" name="stringLength" type="builtin" lib="fn" category="StringBuiltins" bucket="W3C-Standard Functions" hidden="false" prefix="fn" namespace="http://www.w3.org/2005/xpath-functions" fullname="fn.stringLength"><api:summary>
Returns an integer representing the length of the specified string.  The
length is 1-based, so a string that is one character long returns a value of 1.
</api:summary><api:params><api:param name="sourceString" type="xs:string?" optional="true"><api:param-description>
  The string to calculate the length.
  </api:param-description><api:param-name>sourceString</api:param-name><api:param-type>String?</api:param-type></api:param></api:params><api:return>Number?</api:return><api:example class="javascript"><pre xml:space="preserve" xmlns="http://www.w3.org/1999/xhtml">
fn.stringLength("12345")

=&gt; 5
</pre>
</api:example></api:function></api:function-page>