A global utiltity class. The purpose of this class is to put 'global' function that don't quite fit on other places.
More...
#include <util.h>
|
QString | convertTabsToSpaces (const QString &str, int tabSize) |
| Converst all tabs to sapces of the given string, using the current tab/indent settings It converts "\t" to spaces. More...
|
|
QList< int > | tabColumnOffsets (const QString &str, int tabSize) |
| This method returns all tab-column offsets of the given string. More...
|
|
template<typename T > |
bool | intersection (T begin1, T end1, T begin2, T end2, bool exclusive=false, T *resultBegin=0, T *resultEnd=0) |
| This method calculates 2 intersections between 2 ranges. More...
|
|
A global utiltity class. The purpose of this class is to put 'global' function that don't quite fit on other places.
You can use this class like this: Util().converTabsToSpaces()
◆ convertTabsToSpaces()
QString edbee::Util::convertTabsToSpaces |
( |
const QString & |
str, |
|
|
int |
tabSize |
|
) |
| |
Converst all tabs to sapces of the given string, using the current tab/indent settings It converts "\t" to spaces.
- Parameters
-
str | the string where to convert the tabs to space |
tabSize | the size of a single tab. This needs to be at least 1 |
- Returns
- A string with all tabs converted to spaces
◆ intersection()
template<typename T >
bool edbee::Util::intersection |
( |
T |
begin1, |
|
|
T |
end1, |
|
|
T |
begin2, |
|
|
T |
end2, |
|
|
bool |
exclusive = false , |
|
|
T * |
resultBegin = 0 , |
|
|
T * |
resultEnd = 0 |
|
) |
| |
|
inline |
This method calculates 2 intersections between 2 ranges.
- Parameters
-
exclusive | als het exclusief is dan wordt een overlap niet inclusief. In other words:
- Inclusive: end < begin
- Exclusive: end <= begin
|
resultBegin | a pointer to the variable recieving the result |
resultEnd | a pointer to the variable recieving the result |
- Returns
- false => no overlap, true => overlap
◆ tabColumnOffsets()
QList< int > edbee::Util::tabColumnOffsets |
( |
const QString & |
str, |
|
|
int |
tabSize |
|
) |
| |
This method returns all tab-column offsets of the given string.
- Parameters
-
str | the string to convert |
tabSize | the tab size to use for conversion |
- Returns
- a vector with the character-offset in the given string that contains the given tab-column
The documentation for this class was generated from the following files: