MCPcopy Create free account
hub / github.com/MrNeRF/LichtFeld-Studio / GetLineOffsets

Method GetLineOffsets

external/zep/src/buffer.cpp:558–570  ·  view source on GitHub ↗

Method for querying the beginning and end of a line

Source from the content-addressed store, hash-verified

556
557 // Method for querying the beginning and end of a line
558 bool ZepBuffer::GetLineOffsets(const long line, ByteRange& range) const {
559 // Not valid
560 if ((long)m_lineEnds.size() <= line) {
561 range.first = 0;
562 range.second = 0;
563 return false;
564 }
565
566 // Find the line bounds - we know the end, find the start from the previous
567 range.second = m_lineEnds[line];
568 range.first = line == 0 ? 0 : m_lineEnds[line - 1];
569 return true;
570 }
571
572 std::string ZepBuffer::GetFileExtension() const {
573 std::string ext;

Callers 2

UpdateLineSpansMethod · 0.80
GetCommandMethod · 0.80

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected