QuickRank  v2.0
QuickRank: A C++ suite of Learning to Rank algorithms
Functions
strutils.cc File Reference
#include "utils/strutils.h"
#include <algorithm>
#include <iostream>

Functions

char * read_token (char *&str, const char exitch)
 skip a sequence of spaces (see ISSPC macro) and return the token which is considered closed at the next space encountered (if exitch is the FIRST not-space of str the function returns immediately). More...
 
bool is_empty (const char *str)
 return true if str pointer is NULL or is made of spaces (see ISSPC macro) More...
 
unsigned int atou (char *str, const char *sep)
 skip a sequence of spaces (see ISSPC macro) and return the unsigned int after sep More...
 
std::string & trim (std::string &str)
 delete spaces from start/end of a string (in place modification) More...
 

Function Documentation

atou ( char *  str,
const char *  sep 
)

skip a sequence of spaces (see ISSPC macro) and return the unsigned int after sep

is_empty ( const char *  str)

return true if str pointer is NULL or is made of spaces (see ISSPC macro)

read_token ( char *&  str,
const char  exitch = '\0' 
)

skip a sequence of spaces (see ISSPC macro) and return the token which is considered closed at the next space encountered (if exitch is the FIRST not-space of str the function returns immediately).

void trim ( std::string &  str)

delete spaces from start/end of a string (in place modification)