MCPcopy Create free account
hub / github.com/KDE/kdevelop / parseRange

Function parseRange

kdevplatform/vcs/vcsdiff.cpp:126–133  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

124 return QString().setNum(start) + QLatin1Char(',') + QString().setNum(count);
125 }
126 std::pair<uint, uint> parseRange(QStringView range)
127 {
128 int commaPos = range.indexOf(QLatin1Char(','));
129 if (commaPos > -1) {
130 return {range.first(commaPos).toInt(), range.sliced(commaPos + 1).toInt()};
131 }
132 return { range.toInt(), 1 };
133 }
134
135 /* Creates a hunk header line (starting with @@)
136 *

Callers 1

parseHunksFunction · 0.85

Calls 3

toIntMethod · 0.80
indexOfMethod · 0.45
firstMethod · 0.45

Tested by

no test coverage detected