20int main(
int argc,
char **argv)
29 JParser<> zap(
"Example program to test string operations.");
35 catch(
const exception &error) {
41 const JString buffer(
"% = %;",
"key", 123);
45 ASSERT(buffer ==
"key = 123;",
"Test formatting");
57 ASSERT(buffer ==
"HELLO WORLD.",
"Test JString::toUpper()");
63 ASSERT(buffer ==
"hello world.",
"Test JString::toLower()");
67 JString buffer(
"a = %1; b = %2; c = %3;");
73 ASSERT(buffer ==
"a = 3.1415; b = hello; c = 123;",
"Test JString::replace()");
78 int i = JString::toValue<int>(
"1234");
82 ASSERT(i == 1234,
"Test JString::toValue<int>()");
86 JString buffer(
"1 3.1415 hello");
96 ASSERT(i == 1 && d == 3.1415 && w ==
"hello",
"Test JString::assign()");
General purpose messaging.
#define DEBUG(A)
Message macros.
#define ASSERT(A,...)
Assert macro.
Utility class to parse command line options.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
int main(int argc, char **argv)
Wrapper class around STL string class.
JString & toLower()
Convert all character to lower case.
JString & replace(const char target, const char replacement, const std::size_t max=std::numeric_limits< std::size_t >::max())
Replace characters.
JString & toUpper()
Convert all character to upper case.
JString & assign(T &output)
Assign (part of) string to value.
Template definition of a multi-dimensional oscillation probability interpolation table.
Utility class to parse command line options.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).