This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.


The LengthString function returns the number of characters in a string.


int LengthString(
  string string


  • string
    The string whose length in characters is to be returned.

Return Values

Returns an integer representing the number of characters in the string. For a null string the function returns "0".