util.h File Reference

#include <string>
#include <vector>

Go to the source code of this file.

Functions

vector< string > split (const string &str)
vector< string > split (const string &str, const string sep)
vector< string > split (const string &str, int nf)
void rmspace (string &s)
void erase (string &s, const string &sub)
void replace (string &s, const string &sub, const string &r)
void replaceInnerQuote (string &s)
bool remove_end_mark (string &s, const char m[]=".;", int n=2)
bool startWith (const string &s1, const string &s2)
bool startWithIgnoreCase (const string &s1, const string &s2)
string toupper (const string &s)
string acronym (const string &s)
string firstWord (const string &s)


Function Documentation

string acronym ( const string &  s  ) 

void erase ( string &  s,
const string &  sub 
)

string firstWord ( const string &  s  ) 

Referenced by ref::firstAuthor(), and book::makeKey().

bool remove_end_mark ( string &  s,
const char  m[] = ".;",
int  n = 2 
)

Referenced by prt::next(), and ref::next().

void replace ( string &  s,
const string &  sub,
const string &  r 
)

void replaceInnerQuote ( string &  s  ) 

Referenced by book::parse(), and ref::process().

void rmspace ( string &  s  ) 

remove all space from the string s implementation not working with string derived from str.substr(n)

when s is derived from substr it crashes s = str.substr(3); then abort Do not use this algorithm

vector<string> split ( const string &  str,
int  nf 
)

vector<string> split ( const string &  str,
const string  sep 
)

vector<string> split ( const string &  str  ) 

separate the line into name and sequence parts first=name, second=sequence string with gaps

bool startWith ( const string &  s1,
const string &  s2 
)

bool startWithIgnoreCase ( const string &  s1,
const string &  s2 
)

References startWith(), and toupper().

Referenced by ref::process().

string toupper ( const string &  s  ) 


Generated on Wed Aug 10 11:57:04 2011 for Softwares from Orpara by  doxygen 1.5.6