diff options
Diffstat (limited to 'klinkstatus/src/parser/mstring.cpp')
-rw-r--r-- | klinkstatus/src/parser/mstring.cpp | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/klinkstatus/src/parser/mstring.cpp b/klinkstatus/src/parser/mstring.cpp index 114d6dc6..aa2cdec7 100644 --- a/klinkstatus/src/parser/mstring.cpp +++ b/klinkstatus/src/parser/mstring.cpp @@ -26,7 +26,7 @@ using namespace std; -int findWord(QString const& s, QString const& palavra, uint a_partir_do_indice) +int findWord(TQString const& s, TQString const& palavra, uint a_partir_do_indice) { int indice = s.find(palavra, a_partir_do_indice, false); @@ -36,7 +36,7 @@ int findWord(QString const& s, QString const& palavra, uint a_partir_do_indice) return (indice + palavra.length()); } -int findChar(QString const& s, QChar letra, uint a_partir_do_indice) +int findChar(TQString const& s, TQChar letra, uint a_partir_do_indice) { int index = s.find(letra, a_partir_do_indice, false); if(index == -1) @@ -48,10 +48,10 @@ int findChar(QString const& s, QChar letra, uint a_partir_do_indice) /** The string palavra, must not have any spaces. */ -int findSeparableWord(QString const& s_, QString const& palavra, uint a_partir_do_indice) +int findSeparableWord(TQString const& s_, TQString const& palavra, uint a_partir_do_indice) { bool encontrou = true; - QString s(s_); + TQString s(s_); uint indice_palavra = 0; int indice = a_partir_do_indice; @@ -88,7 +88,7 @@ int findSeparableWord(QString const& s_, QString const& palavra, uint a_partir_d return -1; } -int nextNonSpaceChar(QString const& s, uint i) +int nextNonSpaceChar(TQString const& s, uint i) { ++i; // while( (s[i] == ' ' || s[i] == '\t' || s[i] == '\r' || s[i] == '\n') @@ -107,7 +107,7 @@ int nextNonSpaceChar(QString const& s, uint i) e.g. nextSpaceChar("o biltre") => 1 */ -int nextSpaceChar(QString const& s, uint i) +int nextSpaceChar(TQString const& s, uint i) { //while( (s[i] != ' ' && s[i] != '\r' && s[i] != '\n' && s[i] != '\t') && //i < s.size() ) @@ -121,7 +121,7 @@ int nextSpaceChar(QString const& s, uint i) return -1; } -int nextCharDifferentThan(QChar c, QString const& s, uint i) +int nextCharDifferentThan(TQChar c, TQString const& s, uint i) { while(i < s.length() && s[i] == c) ++i; @@ -132,10 +132,10 @@ int nextCharDifferentThan(QChar c, QString const& s, uint i) return -1; } -vector<QString> tokenize(QString s) +vector<TQString> tokenize(TQString s) { Q_ASSERT(!s.isEmpty()); - vector<QString> v; + vector<TQString> v; while(true) { @@ -154,22 +154,22 @@ vector<QString> tokenize(QString s) } else { - QString palavra = s.mid(inicio, fim - inicio); + TQString palavra = s.mid(inicio, fim - inicio); v.push_back(palavra); s.remove(0, fim); } } } -vector<QString> tokenizeWordsSeparatedByDots(QString s) +vector<TQString> tokenizeWordsSeparatedByDots(TQString s) { - vector<QString> v; + vector<TQString> v; while(true) { int inicio = 0; if(s[0] == '.') - inicio = nextCharDifferentThan(QChar('.'), s, 0); + inicio = nextCharDifferentThan(TQChar('.'), s, 0); if(inicio == -1) return v; @@ -181,16 +181,16 @@ vector<QString> tokenizeWordsSeparatedByDots(QString s) } else { - QString palavra = s.mid(inicio, fim - inicio); + TQString palavra = s.mid(inicio, fim - inicio); v.push_back(palavra); s.remove(0, fim); } } } -vector<QString> tokenizeWordsSeparatedBy(QString s, QChar criteria) +vector<TQString> tokenizeWordsSeparatedBy(TQString s, TQChar criteria) { - vector<QString> v; + vector<TQString> v; while(true) { @@ -208,7 +208,7 @@ vector<QString> tokenizeWordsSeparatedBy(QString s, QChar criteria) } else { - QString palavra = s.mid(inicio, fim - inicio); + TQString palavra = s.mid(inicio, fim - inicio); v.push_back(palavra); s.remove(0, fim); } |