Return a right-justified unicode string of length width. >>> unicode_rjust('Hello', 15, '*') '**********Hello' >>> unicode_rjust('你好', 15, '*') '***********你好' >>> unicode_rjust('안녕하세요', 15, '*') '*****안녕하세요' >>> unicode_rjust('こんにちは', 15, '*') '*****こんにちは'
(string: str, width: int, fillbyte: str = ' ')
| 40 | |
| 41 | |
| 42 | def unicode_rjust(string: str, width: int, fillbyte: str = ' ') -> str: |
| 43 | """Return a right-justified unicode string of length width. |
| 44 | >>> unicode_rjust('Hello', 15, '*') |
| 45 | '**********Hello' |
| 46 | >>> unicode_rjust('你好', 15, '*') |
| 47 | '***********你好' |
| 48 | >>> unicode_rjust('안녕하세요', 15, '*') |
| 49 | '*****안녕하세요' |
| 50 | >>> unicode_rjust('こんにちは', 15, '*') |
| 51 | '*****こんにちは' |
| 52 | """ |
| 53 | return string.rjust(width - _count_wchars(string), fillbyte) |
no test coverage detected