Identifies a unit of measure from a string, returning the canonical unit ID.
Matches against the unit ID, short form, plural form, and all alternates.
Case-sensitive matches are tried first (e.g., 'T' = tablespoon, 't' = teaspoon),
then falls back to case-insensitive matching.
Parameters
unit: string
The unit string to identify (e.g., 'cups', 'c', 'C', 'cup').
Identifies a unit of measure from a string, returning the canonical unit ID. Matches against the unit ID, short form, plural form, and all alternates. Case-sensitive matches are tried first (e.g., 'T' = tablespoon, 't' = teaspoon), then falls back to case-insensitive matching.