Changeset 274 for trunk/lib/utility.cc


Ignore:
Timestamp:
May 2, 2007, 11:05:55 AM (14 years ago)
Author:
Peter Johansson
Message:

support for Trac. Fixes #125. Also added a config file.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/utility.cc

    r226 r274  
    8888
    8989
     90  bool is_int(std::string s)
     91  {
     92    std::stringstream ss(s);
     93    int a;
     94    ss >> a;
     95    if(ss.fail())
     96      return false;
     97    // Check that nothing is left on stream
     98    std::string b;
     99    ss >> b;
     100    return b.empty();
     101  }
     102
     103
    90104  std::string ltrim(std::string str)
    91105  {
Note: See TracChangeset for help on using the changeset viewer.