diff options
author | Caolán McNamara <caolanm@redhat.com> | 2012-06-11 13:15:18 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2012-06-11 14:46:46 +0100 |
commit | 8f5629fd5aafc85e509a4160a11a285b0a66e7c0 (patch) | |
tree | 143883c85467b5ce9f5c665338e0f8a25067a0cd /basic | |
parent | 2106d8e648449d34b195068eef5f672a14ea64a8 (diff) |
remove EraseLeadingChars and EraseTrailingChars
Change-Id: Ib9797fe97cd008cc6508ce8cec47dc5373416892
Diffstat (limited to 'basic')
-rw-r--r-- | basic/source/runtime/methods.cxx | 10 | ||||
-rw-r--r-- | basic/source/runtime/methods1.cxx | 6 |
2 files changed, 6 insertions, 10 deletions
diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx index 2333a77ff2e8..9943ad327174 100644 --- a/basic/source/runtime/methods.cxx +++ b/basic/source/runtime/methods.cxx @@ -1188,9 +1188,8 @@ RTLFUNC(LTrim) StarBASIC::Error( SbERR_BAD_ARGUMENT ); else { - String aStr( rPar.Get(1)->GetString() ); - aStr.EraseLeadingChars(); - rPar.Get(0)->PutString( aStr ); + rtl::OUString aStr(comphelper::string::stripStart(rPar.Get(1)->GetString(), ' ')); + rPar.Get(0)->PutString(aStr); } } @@ -1438,9 +1437,8 @@ RTLFUNC(RTrim) StarBASIC::Error( SbERR_BAD_ARGUMENT ); else { - String aStr( rPar.Get(1)->GetString() ); - aStr.EraseTrailingChars(); - rPar.Get(0)->PutString( aStr ); + rtl::OUString aStr(comphelper::string::stripEnd(rPar.Get(1)->GetString(), ' ')); + rPar.Get(0)->PutString(aStr); } } diff --git a/basic/source/runtime/methods1.cxx b/basic/source/runtime/methods1.cxx index 2195a177c52e..42ea005bec82 100644 --- a/basic/source/runtime/methods1.cxx +++ b/basic/source/runtime/methods1.cxx @@ -682,10 +682,8 @@ RTLFUNC(Trim) StarBASIC::Error( SbERR_BAD_ARGUMENT ); else { - String aStr( rPar.Get(1)->GetString() ); - aStr.EraseLeadingChars(); - aStr.EraseTrailingChars(); - rPar.Get(0)->PutString( aStr ); + rtl::OUString aStr(comphelper::string::strip(rPar.Get(1)->GetString(), ' ')); + rPar.Get(0)->PutString(aStr); } } |