toOrdinal and sanitize helpers

Hello,

please find below the `sanitize` and `toOrdinal` helpers.

Thanks
Daniele