20 int main(
int argc, 
char **argv)
 
   29     JParser<> zap(
"Example program to test string operations.");
 
   35   catch(
const exception &error) {
 
   36     FATAL(error.what() << endl);
 
   41     const JString buffer(
"% = %;", 
"key", 123);
 
   43     DEBUG(buffer << endl);
 
   45     ASSERT(buffer == 
"key = 123;", 
"Test formatting");
 
   51     DEBUG(buffer << endl);
 
   55     DEBUG(buffer << endl);
 
   57     ASSERT(buffer == 
"HELLO WORLD.", 
"Test JString::toUpper()");
 
   61     DEBUG(buffer << endl);
 
   63     ASSERT(buffer == 
"hello world.", 
"Test JString::toLower()");
 
   67     JString buffer(
"a = %1; b = %2; c = %3;");
 
   71     DEBUG(buffer << endl);
 
   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");
 
   94     DEBUG(i << 
' ' << d << 
' ' << 
w << endl);
 
   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 & assign(T &output)
Assign (part of) string to value.
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 & toLower()
Convert all character to lower case.
Utility class to parse command line options.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).