diff options
Diffstat (limited to 'docs/features/generating_output.rst')
-rw-r--r-- | docs/features/generating_output.rst | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/docs/features/generating_output.rst b/docs/features/generating_output.rst index f3d2a7f4..d5224e86 100644 --- a/docs/features/generating_output.rst +++ b/docs/features/generating_output.rst @@ -140,17 +140,19 @@ the terminal or not. Aligning Text -------------- -If you would like to generate output which is left, center, or right aligned within a -specified width or the terminal width, the following functions can help: +If you would like to generate output which is left, center, or right aligned +within a specified width or the terminal width, the following functions can +help: - :meth:`cmd2.utils.align_left` - :meth:`cmd2.utils.align_center` - :meth:`cmd2.utils.align_right` -These functions differ from Python's string justifying functions in that they support -characters with display widths greater than 1. Additionally, ANSI style sequences are safely -ignored and do not count toward the display width. This means colored text is supported. If -text has line breaks, then each line is aligned independently. +These functions differ from Python's string justifying functions in that they +support characters with display widths greater than 1. Additionally, ANSI style +sequences are safely ignored and do not count toward the display width. This +means colored text is supported. If text has line breaks, then each line is +aligned independently. @@ -165,5 +167,5 @@ in the output to generate colors on the terminal. The :meth:`cmd2.ansi.style_aware_wcswidth` function solves both of these problems. Pass it a string, and regardless of which Unicode characters and ANSI -text style escape sequences it contains, it will tell you how many characters on the -screen that string will consume when printed. +text style escape sequences it contains, it will tell you how many characters +on the screen that string will consume when printed. |