Mask the middle of a string while keeping a few chars at each end. Useful for displaying credit cards, emails, or API keys in UI / logs without leaking the whole value.
Mask the middle of a string while keeping a few characters at each end visible. Useful for displaying credit card numbers, emails, or API keys in UI without leaking them in full.