--- title: "length (Text length)" slug: "calc-function-length" updated: 2026-05-12T12:36:06Z published: 2026-05-12T12:36:06Z canonical: "docs.lobstersoftware.com/calc-function-length" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.lobstersoftware.com/llms.txt > Use this file to discover all available pages before exploring further. # length (Text length) > [!NOTE] > The $length function determines the number of characters in a text. > > **Hint**: The *minusOne* parameter controls whether 1 is subtracted from the result. > > > [!TIP] > > Tooltip > > > > Syntax: *$length(text[,minusOne=false])* > > > > | Parameter | Description | > > | --- | --- | > > | `text` | Any text | > > | `minusOne` `(optional)` | The optional parameter whether the number 1 should be subtracted from the result. e,g, $length(Hello,false) results in 5, $length(Hello,true) results in 4. The default value is *false*. | > > > > Returns the number of characters in the passed text. > > > > Examples: $length(Hello world) – returns 10, $length(Hello world,true) – returns 9 ## Syntax *$length(text[,minusOne])* ## Parameter | Name | Description | | --- | --- | | text | Any text | | minusOne | The optional parameter whether the number 1 should be subtracted from the result. e,g, $length(Hello,false) results in 5, $length(Hello,true) results in 4. The default value is *false*. | ## Return value The number of characters in the transferred text. ## Example | Syntax | Result | | --- | --- | | $length(Hello World) | 10 | | $length(Hello World,true) | 9 | | $length($null) | 0 | | $length() | 0 |