summaryrefslogtreecommitdiff
path: root/comphelper/source
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2011-11-23 17:24:38 +0000
committerCaolán McNamara <caolanm@redhat.com>2011-11-23 23:16:44 +0000
commit0dbc4fa3efdea90ba23e17e12c2bfe15d763acbf (patch)
tree857875b2edaee72abb836c8235c4bb87e6e6a18b /comphelper/source
parent2dba28faae2266e72c05d8f3d55bfbc3e5771adb (diff)
add string::strip, can replace EraseLeadingAndTrailingChars
Diffstat (limited to 'comphelper/source')
-rw-r--r--comphelper/source/misc/string.cxx10
1 files changed, 10 insertions, 0 deletions
diff --git a/comphelper/source/misc/string.cxx b/comphelper/source/misc/string.cxx
index 02d1cd4d104c..2e8d631edf37 100644
--- a/comphelper/source/misc/string.cxx
+++ b/comphelper/source/misc/string.cxx
@@ -231,6 +231,16 @@ rtl::OUString stripEnd(const rtl::OUString &rIn, sal_Unicode c)
return tmpl_stripEnd<rtl::OUString, sal_Unicode>(rIn, c);
}
+rtl::OString strip(const rtl::OString &rIn, sal_Char c)
+{
+ return stripEnd(stripStart(rIn, c), c);
+}
+
+rtl::OUString strip(const rtl::OUString &rIn, sal_Unicode c)
+{
+ return stripEnd(stripStart(rIn, c), c);
+}
+
sal_uInt32 decimalStringToNumber(
::rtl::OUString const & str )
{