Conditions | 2 |
Total Lines | 12 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | #!/usr/bin/python |
||
29 | @staticmethod |
||
30 | def unicode_translate(text, chars="", replacement="") -> str: |
||
31 | """Replacement for the string.maketrans function |
||
32 | |||
33 | :type text: str |
||
34 | :type chars: str |
||
35 | :type replacement: str |
||
36 | :return: |
||
37 | """ |
||
38 | for char in chars: |
||
39 | text = text.replace(char, replacement[chars.index(char)]) |
||
40 | return text |
||
41 | |||
57 |