src/Utils/Utils.h File Reference

Some useful functions. More...

#include <cstring>
#include <locale>
#include <algorithm>
#include <cctype>
#include <sstream>
#include <iostream>

Go to the source code of this file.


namespace  nor_utils


struct  white_tab
 Set the whitespace to tabs and newlines only. More...


void nor_utils::skip_line (istream &inFile, const int nLines=1)
 Skip nLine lines of a given stream.
string nor_utils::addAndCheckExtension (const string &file, const string &extension)
 Returns the file with the extension.
string nor_utils::trim (const string &str)
 Trim a string on the left and on the right.
bool nor_utils::cmp_nocase (const string &s1, const string &s2)
 Case insensitive comparison.
size_t nor_utils::count_columns (istream &in)
 Count the number of columns from a stream.
template<typename T1, typename T2, typename Pred>
bool nor_utils::comparePairOnSecond (const pair< T1, T2 > &el1, const pair< T1, T2 > &el2)
 Sort pairs on the second element.
template<typename T>
bool nor_utils::is_zero (const T val, const T smallVal=1E-10)
 Checks if a number is equal to zero, between a positive and negative limit of smallVal.

Detailed Description

Some useful functions.

Definition in file Utils.h.

Generated on Mon Nov 28 21:43:47 2005 for MultiBoost by  doxygen 1.4.5