33 bool intersection( T begin1, T end1, T begin2, T end2,
bool exclusive=
false, T* resultBegin=0, T* resultEnd=0 )
36 if( end1 <= begin2 )
return false;
37 if( end2 <= begin1 )
return false;
39 if( end1 < begin2 )
return false;
40 if( end2 < begin1 )
return false;
44 if( resultBegin ) { *resultBegin = qMax(begin1,begin2); }
45 if( resultEnd ) { *resultEnd = qMin(end1,end2); }
A global utiltity class. The purpose of this class is to put 'global' function that don't quite fit o...
Definition: util.h:18
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.
Definition: util.h:33
QString convertTabsToSpaces(const QString &str, int tabSize)
Converst all tabs to sapces of the given string, using the current tab/indent settings It converts "\...
Definition: util.cpp:21
Copyright 2011-2013 - Reliable Bits Software by Blommers IT.
Definition: commentcommand.cpp:22
QList< int > tabColumnOffsets(const QString &str, int tabSize)
This method returns all tab-column offsets of the given string.
Definition: util.cpp:48