--- title: "left()" slug: "string-left" updated: 2026-08-17T07:44:13Z published: 2026-08-17T07:44:13Z canonical: "docs.lobstersoftware.com/string-left" --- > ## 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. # left() This function returns the **b** leftmost characters of **a**. ## Parameters | Parameter | Description | | --- | --- | | a | Text. | | b | Length of the result text. If **a** is shorter, **a** is returned. See examples. | ## Examples | Parameter a | Parameter b | Result | | --- | --- | --- | | | 1 | | | abcde | 1 | a | | abcde | 6 | abcde |