5.1.1.10.11. StringTools¶
This module provides string tools.
-
CodeReview.Tools.StringTools.remove_trailing_newline(text)[source]¶ Return the string text with only the last trailing newline (
\r\n,\r,\n) removed. By contrast the standard functionstring.rstrip()removes all the trailing newlines.