My Project
builddir
build
BUILD
coin-or-OS-2.10.3-build
OS-releases-2.10.3
OS
src
OSUtils
OSStringUtil.cpp
Go to the documentation of this file.
1
/* $Id: OSStringUtil.cpp 3729 2010-10-18 12:25:22Z Gassmann $ */
17
#include "
OSStringUtil.h
"
18
#include "
OSParameters.h
"
19
#include "
OSBase64.h
"
20
#include "
OSMathUtil.h
"
21
22
#include <sstream>
23
24
using
std::ostringstream;
25
26
38
std::string
writeStringData
(std::string str)
39
{
40
ostringstream outStr;
41
char
quote;
42
43
size_t
iIndex = str.rfind(
"\""
);
44
if
(iIndex == std::string::npos)
45
quote =
'\"'
;
46
else
47
quote =
'\''
;
48
49
outStr << quote << str << quote;
50
return
outStr.str();
51
}
52
53
54
55
std::string
makeStringFromInt
(std::string theString,
int
theInt)
56
{
57
ostringstream outStr;
58
outStr << theString;
59
outStr << theInt;
60
return
outStr.str();
61
}
//end makeStringFromInt
OSBase64.h
OSMathUtil.h
writeStringData
std::string writeStringData(std::string str)
writeStringData
Definition
OSStringUtil.cpp:38
makeStringFromInt
std::string makeStringFromInt(std::string theString, int theInt)
Definition
OSStringUtil.cpp:55
OSStringUtil.h
OSParameters.h
Generated by
1.12.0