/home/coin/SVN-release/OS-2.4.2/OS/src/OSUtils/OSStringUtil.cpp

Go to the documentation of this file.
00001 /* $Id: OSStringUtil.cpp 3729 2010-10-18 12:25:22Z Gassmann $ */
00017 #include "OSStringUtil.h"
00018 #include "OSParameters.h"
00019 #include "OSBase64.h"
00020 #include "OSMathUtil.h"
00021 
00022 
00023 #include <sstream>
00024 
00025 //using std::cout;
00026 //using std::endl;
00027 using std::ostringstream;
00028 
00029 
00041 std::string writeStringData(std::string str)
00042 {
00043     ostringstream outStr;
00044     char quote;
00045 
00046     size_t iIndex = str.rfind("\"");
00047     if (iIndex == std::string::npos)
00048         quote = '\"';
00049     else
00050         quote = '\'';
00051 
00052     outStr << quote << str << quote;
00053     return outStr.str();
00054 }
00055 
00056 
00057 
00058 std::string makeStringFromInt(std::string theString, int theInt)
00059 {
00060     ostringstream outStr;
00061     outStr << theString;
00062     outStr << theInt;
00063     return outStr.str();
00064 }//end makeStringFromInt

Generated on Wed Nov 30 03:04:24 2011 by  doxygen 1.4.7