--- title: "substring()" slug: "string-substring" updated: 2026-08-17T08:37:45Z published: 2026-08-17T08:37:45Z canonical: "docs.lobstersoftware.com/string-substring" --- > ## 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. # substring() This function returns a substring of text **a** starting at position **b** with a length of **c**. ## Parameters | Parameter | Description | | --- | --- | | a | Text. | | b | Start position (index begins at "1"). | | c | (optional) Length. Full length of text **a** if empty. | ## Examples | Parameter a | Parameter b | Parameter c | Result | | --- | --- | --- | --- | | abcdef | 4 | 3 | def | | abcdef | 4 | 1 | d | | abcdef | 1 | | abcdef |