summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/libutil.cc
diff options
context:
space:
mode:
authordshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2007-02-20 10:47:52 +0000
committerdshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2007-02-20 10:47:52 +0000
commitfa27b5e7cb607e9718e2ebd43af84940ff977aa2 (patch)
tree88a2c751e4d0d5faace20f8537211013a824d63d /crawl-ref/source/libutil.cc
parenta191a19ff4afeae3cbc76f120463152c5ebfc2ea (diff)
downloadcrawl-ref-fa27b5e7cb607e9718e2ebd43af84940ff977aa2.tar.gz
crawl-ref-fa27b5e7cb607e9718e2ebd43af84940ff977aa2.zip
SYMBOL: is now obsolete in maps, replaced by SUBST:
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@956 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/libutil.cc')
-rw-r--r--crawl-ref/source/libutil.cc12
1 files changed, 10 insertions, 2 deletions
diff --git a/crawl-ref/source/libutil.cc b/crawl-ref/source/libutil.cc
index d380b92419..5246c2704d 100644
--- a/crawl-ref/source/libutil.cc
+++ b/crawl-ref/source/libutil.cc
@@ -193,9 +193,11 @@ void lowercase(std::string &s)
s[i] = tolower(s[i]);
}
+// Replaces all occurrences of any of the characters in tofind with the
+// replacement string.
std::string replace_all_of(std::string s,
- const std::string &tofind,
- const std::string &replacement)
+ const std::string &tofind,
+ const std::string &replacement)
{
std::string::size_type start = 0;
std::string::size_type found;
@@ -349,6 +351,12 @@ int cancelable_get_line( char *buf, int len, int maxcol,
return reader.read_line();
}
+std::string trimmed_string( std::string s )
+{
+ trim_string(s);
+ return (s);
+}
+
// also used with macros
std::string & trim_string( std::string &str )
{