![]() |
QuickRank
v2.0
QuickRank: A C++ suite of Learning to Rank algorithms
|
#include <cctype>#include <string>Go to the source code of this file.
Macros | |
| #define | ISSPC(ch) (ch==' ' || ch=='\t' || ch=='\n' || ch=='\v' || ch=='\f' || ch=='\r') |
| return true if ch is a space-char More... | |
| #define | ISEMPTY(str) (*(str)=='\0') |
| return true if str is empty string More... | |
Functions | |
| char * | 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). 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... | |
| #define ISEMPTY | ( | str | ) | (*(str)=='\0') |
return true if str is empty string
| #define ISSPC | ( | ch | ) | (ch==' ' || ch=='\t' || ch=='\n' || ch=='\v' || ch=='\f' || ch=='\r') |
return true if ch is a space-char
| unsigned int atou | ( | char * | str, |
| const char * | sep | ||
| ) |
skip a sequence of spaces (see ISSPC macro) and return the unsigned int after sep
| bool is_empty | ( | const char * | str | ) |
return true if str pointer is NULL or is made of spaces (see ISSPC macro)
| char* 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).
| std::string& trim | ( | std::string & | str | ) |
delete spaces from start/end of a string (in place modification)
1.8.11