#include <string>
#include <iostream>
#include <fstream>
#include <locale>
#include <iomanip>
#include "JLang/JString.hh"
#include "Jeep/JParser.hh"
#include "Jeep/JMessage.hh"
 
Go to the source code of this file.
 | 
| int  | main (int argc, char **argv) | 
|   | 
Example program to test JLANG::JString class. 
- Author
 - mdejong 
 
Definition in file JString.cc.
 
◆ main()
      
        
          | int main  | 
          ( | 
          int  | 
          argc,  | 
        
        
           | 
           | 
          char **  | 
          argv  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
Definition at line 20 of file JString.cc.
   28     JParser<> zap(
"Example program to test string operations.");
 
   34   catch(
const exception &error) {
 
   35     FATAL(error.what() << endl);
 
   41   cout << JString(
"%s = %d;", 
"key", 123)   << endl;
 
   42   cout << JString(
"hello world.").toUpper() << endl;
 
   45     JString buffer(
"a = %1; b = %2; c = %3;");
 
   47     cout << buffer.replace(
"%1", 3.1415).replace(
"%2", 
"hello").replace(
"%3", 123) << endl;
 
   52     int i = JString::toValue<int>(
"1234");
 
   58     JString buffer(
"1 3.1415 hello");
 
   64     buffer.assign(i).assign(d).assign(
w);
 
   66     cout << i << 
' ' << d << 
' ' << 
w << endl;