--- title: "string-compare()" slug: "string-compare" updated: 2026-08-17T08:34:28Z published: 2026-08-17T08:34:28Z canonical: "docs.lobstersoftware.com/string-compare" --- > ## 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. # string-compare() This function performs a lexical comparison of two texts and returns whether **a** is equal to **b** (value "0"), **a** is less than **b** (value -"1") or **a** is greater than **b** (value "1"). Upper and lower case are considered. See examples. ## Parameters | Parameter | Description | | --- | --- | | a | Text | | b | Text | ## Examples | Parameter a | Parameter b | Result | | --- | --- | --- | | a | a | 0 | | a | b | -1 | | b | a | 1 | | abc | abc | 0 | | abc | abd | -1 | | ABC | abc | -1 | | abc | aaa | 1 | | ABC | aaa | -1 |