From 137d900672cf15df2d5f3cf5988aff20d33620f7 Mon Sep 17 00:00:00 2001 From: dshaligram Date: Fri, 25 Jan 2008 11:13:18 +0000 Subject: [1801838] Use a menu to show mutation list so long lists don't scroll off the end of the terminal. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3331 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/libutil.cc | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'crawl-ref/source/libutil.cc') diff --git a/crawl-ref/source/libutil.cc b/crawl-ref/source/libutil.cc index ac78351bc2..62d7d9374e 100644 --- a/crawl-ref/source/libutil.cc +++ b/crawl-ref/source/libutil.cc @@ -466,6 +466,12 @@ std::string &trim_string( std::string &str ) return (str); } +std::string &trim_string_right( std::string &str ) +{ + str.erase( str.find_last_not_of( " \t\n\r" ) + 1 ); + return (str); +} + static void add_segment(std::vector &segs, std::string s, bool trim, -- cgit v1.2.3-54-g00ecf