Skip to main content

normalize

Function normalize 

Source
pub fn normalize(spelling: SidSpelling, expr: &str) -> String
Expand description

LOWER(TRIM(expr)) in this engine’s spelling — the canonical normalization, and the only one permitted: the natural value alone, never salted.

Public because what an engine’s fold and trim return is a separate measurement from what its hash returns, and a test that can make only the first one still proves half the claim. A test that re-spelled the normalization would be testing itself.

Parameters:

  • spelling: this engine’s vocabulary;
  • expr: an already-rendered value expression.