diff options
author | Dwayne Boone <dwayne@zeroc.com> | 2008-02-05 14:02:38 -0330 |
---|---|---|
committer | Dwayne Boone <dwayne@zeroc.com> | 2008-02-05 14:02:38 -0330 |
commit | e4dadd4907bdc43f35f87a743fb6ba89df53257d (patch) | |
tree | b6928dfd4601a8e8d989661dc6a072483b23f39d /cppe/src/IceE/StringUtil.cpp | |
parent | Minor fix (diff) | |
download | ice-e4dadd4907bdc43f35f87a743fb6ba89df53257d.tar.bz2 ice-e4dadd4907bdc43f35f87a743fb6ba89df53257d.tar.xz ice-e4dadd4907bdc43f35f87a743fb6ba89df53257d.zip |
Bug 1373 - allowable property names in config files
Added continue to allDemos scripts
Diffstat (limited to 'cppe/src/IceE/StringUtil.cpp')
-rw-r--r-- | cppe/src/IceE/StringUtil.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/cppe/src/IceE/StringUtil.cpp b/cppe/src/IceE/StringUtil.cpp index 8ea102ad407..1a797592071 100644 --- a/cppe/src/IceE/StringUtil.cpp +++ b/cppe/src/IceE/StringUtil.cpp @@ -309,6 +309,22 @@ IceUtil::unescapeString(const string& s, string::size_type start, string::size_t } // +// Trim white space (" \t\r\n") +// +string +IceUtil::trim(const string& s) +{ + const string delim = " \t\r\n"; + if(s.length() != 0) + { + string::size_type beg = s.find_first_not_of(delim); + string::size_type end = s.find_last_not_of(delim); + return s.substr(beg, end - beg + 1); + } + return s; +} + +// // If a single or double quotation mark is found at the start position, // then the position of the matching closing quote is returned. If no // quotation mark is found at the start position, then 0 is returned. |