Pad the right with a given character. Args: count (int): Number of characters to pad. character (str, optional): Character to pad with. Defaults to " ".
(self, count: int, character: str = " ")
| 931 | ] |
| 932 | |
| 933 | def pad_right(self, count: int, character: str = " ") -> None: |
| 934 | """Pad the right with a given character. |
| 935 | |
| 936 | Args: |
| 937 | count (int): Number of characters to pad. |
| 938 | character (str, optional): Character to pad with. Defaults to " ". |
| 939 | """ |
| 940 | assert len(character) == 1, "Character must be a string of length 1" |
| 941 | if count: |
| 942 | self.plain = f"{self.plain}{character * count}" |
| 943 | |
| 944 | def align(self, align: AlignMethod, width: int, character: str = " ") -> None: |
| 945 | """Align text to a given width. |
no outgoing calls