Compare
Compare two texts exactly, ignoring case, or in natural order where numbers inside the text are compared by value.
Command in the String toolkit · id ooa.string/compare · 4 inputs (2 required), 2 outputs
Inputs
| Input | Type | Required | Default | What it is |
|---|---|---|---|---|
| Text | String | Yes | First text. | |
| Other | String | Yes | Second text. | |
| Mode | String | No | exact | exact, ignore_case, or natural (file2 before file10, case ignored). |
| Ignore line breaks | Boolean | No | false | Treat each line break (\r\n or \n) as a space, so text wrapped onto several lines still matches. |
Outputs
| Output | Type | What it is |
|---|---|---|
| result | Number | -1 when the first text comes first, 0 when they are equal, 1 when it comes after. |
| equal | Boolean | True when the texts are equal under the chosen mode. |