From e62176913405f98fce84a19d63cb211c6cfc3713 Mon Sep 17 00:00:00 2001 From: fluxgen Date: Tue, 22 Nov 2005 21:58:25 +0000 Subject: testing replaceString --- src/tests/StringUtiltest.cc | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/src/tests/StringUtiltest.cc b/src/tests/StringUtiltest.cc index 78afcb1..768ad7e 100644 --- a/src/tests/StringUtiltest.cc +++ b/src/tests/StringUtiltest.cc @@ -28,13 +28,6 @@ #include #include -#ifdef UDS -#include -#include -// configure UDS -uds::uds_flags_t uds::flags = uds::leak_check|uds::log_allocs; -#endif - using namespace std; using namespace FbTk; @@ -132,13 +125,26 @@ void testGetStringBetween() { } } int main() { -#ifdef UDS - uds::Init uds_init; -#endif + try { + string replaceme = "something((((otherthanthis)could[be]changed"; + + string newstr = StringUtil::replaceString(replaceme, "(", "\\("); + + newstr = StringUtil::replaceString(newstr, ")", "\\)"); + newstr = StringUtil::replaceString(newstr, "be", "not be"); + + cerr<<"original = "<