MCPcopy Create free account
hub / github.com/BZFlag-Dev/bzflag / getCurrentWord

Method getCurrentWord

other_src/astyle/src/ASResource.cpp:551–562  ·  view source on GitHub ↗

get the current word on a line index must point to the beginning of the word

Source from the content-addressed store, hash-verified

549// get the current word on a line
550// index must point to the beginning of the word
551string ASBase::getCurrentWord(const string& line, size_t index) const
552{
553 assert(isCharPotentialHeader(line, index));
554 size_t lineLength = line.length();
555 size_t i;
556 for (i = index; i < lineLength; i++)
557 {
558 if (!isLegalNameChar(line[i]))
559 break;
560 }
561 return line.substr(index, i - index);
562}
563
564} // end namespace astyle

Callers

nothing calls this directly

Calls 1

lengthMethod · 0.45

Tested by

no test coverage detected