edbee - Qt Editor Library
|
A special class to perform line-ending detection. More...
#include <lineending.h>
Public Types | |
enum | Type { UnixType = 0, WindowsType = 1, MacClassicType = 2, TypeCount } |
Public Member Functions | |
virtual LineEnding::Type | type () const |
This method returns the type. More... | |
virtual const char * | chars () const |
This method returns the chars. More... | |
virtual const char * | escapedChars () const |
This method returns the escaped chars. More... | |
virtual const char * | name () const |
This method returns the name of the line ending. More... | |
Static Public Member Functions | |
static LineEnding * | types () |
This method returns the line endings. More... | |
static int | typeCount () |
static LineEnding * | get (int idx) |
This methode returns the line ending from the given type. More... | |
static LineEnding * | unixType () |
Returns the unix line ending type. More... | |
static LineEnding * | windowsType () |
static LineEnding * | macClassicType () |
Returns the Mac class line ending type. More... | |
static LineEnding * | detect (const QString &str, LineEnding *unkownEnding=0) |
This method detects the, line endings of a QString. A byte array is tricky because the encoding could be multi-byte. More... | |
Protected Member Functions | |
LineEnding (LineEnding::Type ending, const char *chars, const char *escaped_chars, const char *name) | |
Constructs a line ending type. More... | |
virtual | ~LineEnding () |
A special class to perform line-ending detection.
|
explicitprotected |
Constructs a line ending type.
type | the type enum constant |
chars | the chars used for the line ending |
escaped | an escaped variant of the characters |
name | the name of the line ending |
|
protectedvirtual |
|
inlinevirtual |
This method returns the chars.
|
static |
This method detects the, line endings of a QString. A byte array is tricky because the encoding could be multi-byte.
str | the string to find the line-endings. |
unknown | the type to return when the ending is not nown. (defaults to 0) |
|
inlinevirtual |
This method returns the escaped chars.
|
static |
This methode returns the line ending from the given type.
|
static |
Returns the Mac class line ending type.
|
inlinevirtual |
This method returns the name of the line ending.
|
inlinevirtual |
This method returns the type.
|
inlinestatic |
|
static |
This method returns the line endings.
type | the type to retrieve |
|
static |
Returns the unix line ending type.
|
static |