summaryrefslogtreecommitdiffstats
path: root/klinkstatus/src/parser/mstring.h
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:54:04 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:54:04 +0000
commitdc6b8e72fed2586239e3514819238c520636c9d9 (patch)
tree88b200df0a0b7fab9d6f147596173556f1ed9a13 /klinkstatus/src/parser/mstring.h
parent6927d4436e54551917f600b706a8d6109e49de1c (diff)
downloadtdewebdev-dc6b8e72fed2586239e3514819238c520636c9d9.tar.gz
tdewebdev-dc6b8e72fed2586239e3514819238c520636c9d9.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdewebdev@1157656 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'klinkstatus/src/parser/mstring.h')
-rw-r--r--klinkstatus/src/parser/mstring.h64
1 files changed, 32 insertions, 32 deletions
diff --git a/klinkstatus/src/parser/mstring.h b/klinkstatus/src/parser/mstring.h
index cd359c7d..198850db 100644
--- a/klinkstatus/src/parser/mstring.h
+++ b/klinkstatus/src/parser/mstring.h
@@ -21,7 +21,7 @@
#ifndef STRING_H
#define STRING_H
-#include <qstring.h>
+#include <tqstring.h>
#include <vector>
#include <cctype>
@@ -37,14 +37,14 @@ typedef unsigned int uint;
e.g.
findWord("Biltre larvado", "biltre") => 6
*/
-int findWord(QString const& s, QString const& palavra, uint a_partir_do_indice = 0);
+int findWord(TQString const& s, TQString const& palavra, uint a_partir_do_indice = 0);
/**
Similar to std::string::find but return the next index of the first char
it finds.
Case insensitive.
*/
-int findChar(QString const& s, QChar letra, uint a_partir_do_indice = 0);
+int findChar(TQString const& s, TQChar letra, uint a_partir_do_indice = 0);
/**
Same as findWord but non space chars are eliminated.
@@ -55,70 +55,70 @@ int findChar(QString const& s, QChar letra, uint a_partir_do_indice = 0);
findWord("<\na href=""></a>", "<a") => -1
findSeparableWord("<\na href=""></a>", "<a") => 3
*/
-int findSeparableWord(QString const& s, QString const& palavra, uint a_partir_do_indice = 0);
+int findSeparableWord(TQString const& s, TQString const& palavra, uint a_partir_do_indice = 0);
/**
Space means Unicode characters with decimal values
9 (TAB), 10 (LF), 11 (VT), 12 (FF), 13 (CR), and 32 (Space).
*/
-bool isSpace(QChar c);
+bool isSpace(TQChar c);
/**
Return -1 if unsuccessful.
*/
-int nextNonSpaceChar(QString const& s, uint i);
-int nextNonSpaceCharReverse(QString const& s, uint i);
-int nextSpaceChar(QString const& s, uint i);
+int nextNonSpaceChar(TQString const& s, uint i);
+int nextNonSpaceCharReverse(TQString const& s, uint i);
+int nextSpaceChar(TQString const& s, uint i);
-int nextCharDifferentThan(QChar c, QString const& s, uint i);
+int nextCharDifferentThan(TQChar c, TQString const& s, uint i);
/** Return a vector with the words */
-std::vector<QString> tokenize(QString s);
-std::vector<QString> tokenizeWordsSeparatedByDots(QString s);
-std::vector<QString> tokenizeWordsSeparatedBy(QString s, QChar criteria);
+std::vector<TQString> tokenize(TQString s);
+std::vector<TQString> tokenizeWordsSeparatedByDots(TQString s);
+std::vector<TQString> tokenizeWordsSeparatedBy(TQString s, TQChar criteria);
/**
Returns a string that has whitespace removed from the start and the end,
and which has each sequence of internal whitespace replaced with a single space.
*/
-QString simplifyWhiteSpace(QString const& s);
+TQString simplifyWhiteSpace(TQString const& s);
/**
If char 'caractere' is the last in the string 's' it is removed
*/
-void removeLastCharIfExists(QString& s, QChar caractere);
+void removeLastCharIfExists(TQString& s, TQChar caractere);
-QString upperCase(QString const& s);
-QString lowerCase(QString const& s);
+TQString upperCase(TQString const& s);
+TQString lowerCase(TQString const& s);
/**
Remove whitespaces from the end of the string
*/
-void stripWhiteSpaceFromTheEnd(QString& s);
+void stripWhiteSpaceFromTheEnd(TQString& s);
/**
Returns a string that has whitespace removed from the start and the end.
*/
-void stripWhiteSpace(QString& s);
+void stripWhiteSpace(TQString& s);
/**
Case insensitive comparisons
*/
-bool equal(QString const& s1, QString const& s2);
-bool notEqual(QString const& s1, QString const& s2);
+bool equal(TQString const& s1, TQString const& s2);
+bool notEqual(TQString const& s1, TQString const& s2);
-bool equal(QChar c1, QChar c2);
-bool notEqual(QChar c1, QChar c2);
+bool equal(TQChar c1, TQChar c2);
+bool notEqual(TQChar c1, TQChar c2);
//_________________________________________________________________________
-inline bool isSpace(QChar c)
+inline bool isSpace(TQChar c)
{
return c.isSpace();
}
-inline bool equal(QString const& s1, QString const& s2)
+inline bool equal(TQString const& s1, TQString const& s2)
{
if(s1 == s2)
return true;
@@ -126,44 +126,44 @@ inline bool equal(QString const& s1, QString const& s2)
return s1.lower() == s2.lower();
}
-inline bool notEqual(QString const& s1, QString const& s2)
+inline bool notEqual(TQString const& s1, TQString const& s2)
{
return !(equal(s1, s2));
}
-inline bool equal(QChar c1, QChar c2)
+inline bool equal(TQChar c1, TQChar c2)
{
return c1.lower() == c2.lower();
}
-inline bool notEqual(QChar c1, QChar c2)
+inline bool notEqual(TQChar c1, TQChar c2)
{
return !(equal(c1, c2));
}
-inline QString upperCase(QString const& s)
+inline TQString upperCase(TQString const& s)
{
return s.upper();
}
-inline QString lowerCase(QString const& s)
+inline TQString lowerCase(TQString const& s)
{
return s.lower();
}
-inline QString simplifyWhiteSpace(QString const& s)
+inline TQString simplifyWhiteSpace(TQString const& s)
{
return s.simplifyWhiteSpace();
}
-inline void removeLastCharIfExists(QString& s, QChar caractere)
+inline void removeLastCharIfExists(TQString& s, TQChar caractere)
{
int index = s.length() - 1;
if(s[index] == caractere)
s.remove(index);
}
-inline void stripWhiteSpace(QString& s)
+inline void stripWhiteSpace(TQString& s)
{
s = s.stripWhiteSpace();
}