Remove a suffix if it exists. Args: suffix (str): Suffix to remove.
(self, suffix: str)
| 541 | return self |
| 542 | |
| 543 | def remove_suffix(self, suffix: str) -> None: |
| 544 | """Remove a suffix if it exists. |
| 545 | |
| 546 | Args: |
| 547 | suffix (str): Suffix to remove. |
| 548 | """ |
| 549 | if self.plain.endswith(suffix): |
| 550 | self.right_crop(len(suffix)) |
| 551 | |
| 552 | def get_style_at_offset(self, console: "Console", offset: int) -> Style: |
| 553 | """Get the style of a character at give offset. |