Pudu programming language
Menu
API reference

Std.Text.compare

1 declaration

fn

compare: Str -> Str -> Int

This is a callable function.

What it does

Two texts compared without materialising the comparison as a number.

Answers -1, 0, or 1, which is what a sort needs.

Read the signature

  • The text after the name is the type checked by Pudu.
  • Read arrows from left to right: inputs come first, and the final type is returned.

Back to Std.TextSearch related declarations