libkmime
KMime::CharFreq Class Reference
List of all members.Detailed Description
Definition at line 24 of file kmime_charfreq.h.
Public Types | |
enum | Type { None = 0, EightBitData, Binary = EightBitData, SevenBitData, EightBitText, SevenBitText } |
Public Member Functions | |
CharFreq (const QByteArray &buf) | |
CharFreq (const char *buf, size_t len) | |
Type | type () const |
bool | isEightBitData () const |
bool | isEightBitText () const |
bool | isSevenBitData () const |
bool | isSevenBitText () const |
bool | hasTrailingWhitespace () const |
bool | hasLeadingFrom () const |
float | printableRatio () const |
float | controlCodesRatio () const |
Protected Attributes | |
uint | NUL |
uint | CTL |
uint | CR |
uint | LF |
uint | CRLF |
uint | printable |
uint | eightBit |
uint | total |
uint | lineMin |
uint | lineMax |
bool | mTrailingWS |
bool | mLeadingFrom |
Member Function Documentation
bool KMime::CharFreq::hasTrailingWhitespace | ( | ) | const |
Returns true if buf has trailing whitespace, i.e.
if any line ends with space (' ') or tab ('').
Definition at line 126 of file kmime_charfreq.cpp.
bool KMime::CharFreq::hasLeadingFrom | ( | ) | const |
Returns true if buf contains a line that starts with "From ".
Definition at line 130 of file kmime_charfreq.cpp.
float KMime::CharFreq::printableRatio | ( | ) | const |
Returns the percentage of printable characters: printable/total.
If total == 0, the result is undefined.
Definition at line 164 of file kmime_charfreq.cpp.
float KMime::CharFreq::controlCodesRatio | ( | ) | const |
Returns the percentage of control code (CTLs): CTL/total.
If total == 0, the result is undefined.
Definition at line 169 of file kmime_charfreq.cpp.
The documentation for this class was generated from the following files: