13 #include <Poco/SharedPtr.h>
24 unsigned int endPos = 0;
25 for(
unsigned int i = 0; i < wordOffsets.size(); i++)
27 if(wordOffsets[i].beginOffset > incomeContent.length() || wordOffsets[i].endOffset > incomeContent.length())
29 throw std::length_error(
"bad string length");
32 ret.append(incomeContent.begin() + endPos, incomeContent.begin() + wordOffsets[i].beginOffset);
34 ret.append(incomeContent.begin() + wordOffsets[i].beginOffset, incomeContent.begin() + wordOffsets[i].endOffset);
36 endPos = wordOffsets[i].endOffset;
42 ret.append(incomeContent.begin() + endPos, incomeContent.end());
48 if(!inDataStructPtr.isNull())
50 setHlBegin(inDataStructPtr->getParams(0).beginMarker);
51 setHlEnd(inDataStructPtr->getParams(0).endMarker);