kmail
KMail::Util Namespace ReferenceThe Util namespace contains a collection of helper functions use in various places.
More...
Detailed Description
The Util namespace contains a collection of helper functions use in various places.
Function Documentation
Append a QCString to a bytearray.
Trailing nul not copied.
Definition at line 164 of file util.cpp.
void KMail::Util::append |
( |
QByteArray & |
that, |
|
|
const char * |
str | |
|
) |
| | |
Append a char* to a bytearray.
Trailing nul not copied.
Definition at line 153 of file util.cpp.
Append a bytearray to a bytearray.
No trailing nuls anywhere.
Definition at line 144 of file util.cpp.
QByteArray KMail::Util::ByteArray |
( |
const DwString & |
str |
) |
|
Creates a QByteArray from a QCString without detaching (duplicating the data).
Fast, but be careful, the QCString gets modified by this; this is only good for the case where the QCString is going to be thrown away afterwards anyway.
Definition at line 124 of file util.h.
bool KMail::Util::checkOverwrite |
( |
const KURL & |
url, |
|
|
QWidget * |
w | |
|
) |
| | [inline] |
size_t KMail::Util::crlf2lf |
( |
char * |
str, |
|
|
const size_t |
strLen | |
|
) |
| | |
Convert all sequences of "\r\n" (carriage return followed by a line feed) to a single "\n" (line feed).
The conversion happens in place. Returns the length of the resulting string. - Parameters:
-
| str | The string to convert. |
| strLen | The length of the string to convert. |
- Returns:
- The new length of the converted string.
Definition at line 44 of file util.cpp.
QCString KMail::Util::CString |
( |
const DwString & |
str |
) |
|
DwString KMail::Util::dwString |
( |
const QByteArray & |
str |
) |
|
DwString KMail::Util::dwString |
( |
const QCString & |
str |
) |
|
void KMail::Util::insert |
( |
QByteArray & |
that, |
|
|
uint |
index, |
|
|
const char * |
s | |
|
) |
| | |
Convert "\n" line endings to "\r\n".
- Parameters:
-
| src | The source string to convert. NOT null-terminated. |
- Returns:
- The result string. NOT null-terminated.
Definition at line 92 of file util.cpp.
Convert "\n" line endings to "\r\n".
- Parameters:
-
| src | The source string to convert. |
- Returns:
- The result string.
Definition at line 74 of file util.cpp.
void KMail::Util::restoreQCString |
( |
QCString & |
str |
) |
[inline] |
Restore the QCString after byteArrayFromQCStringNoDetach modified it.
Definition at line 136 of file util.h.
|