Masks a phone number for log output. Preserves the 972 country
code and the last 3 digits so users can self-identify their record
without exposing the full PII.
Parameters
raw: string
Any string; may be malformed or empty.
Returns string
972***LAST3 when raw parses to a canonical Israeli
number; <masked> otherwise. Never throws.
Masks a phone number for log output. Preserves the
972country code and the last 3 digits so users can self-identify their record without exposing the full PII.