PamGram/utils/uid.py

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

9 lines
225 B
Python
Raw Permalink Normal View History

from typing import Union
def mask_number(number: int) -> Union[int, str]:
if 100000000 <= number < 1000000000:
number_str = str(number)
return f"{number_str[0:2]}****{number_str[6:9]}"
return number