pub fn mask_for_pattern(pattern: &ParsedPattern) -> StringExpand description
Build an InputMask grammar string from a parsed pattern. Each
digit segment becomes the corresponding number of 9 chars; the
AM/PM period segment becomes >AA (two uppercase-locked letters);
literals stay as fixed separators.
Pattern → mask:
%Y-%m-%d→9999-99-99%m/%d/%Y→99/99/9999%H:%M:%S→99:99:99%I:%M %p→99:99 >AA
Backslashes in the pattern’s literal positions are escaped via
\\ so the InputMask parser treats them as literals (otherwise
\X in a literal would consume the following char).