Skip to main content

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​

InputTypeRequiredDefaultWhat it is
TextStringYesFirst text.
OtherStringYesSecond text.
ModeStringNoexactexact, ignore_case, or natural (file2 before file10, case ignored).
Ignore line breaksBooleanNofalseTreat each line break (\r\n or \n) as a space, so text wrapped onto several lines still matches.

Outputs​

OutputTypeWhat it is
resultNumber-1 when the first text comes first, 0 when they are equal, 1 when it comes after.
equalBooleanTrue when the texts are equal under the chosen mode.