Definition at line 571 of file TextEdit.h. References mText. Referenced by ComputeCaretPosition(), ComputeDocHeight(), ComputeMaxWidth(), DrawText(), FindLineAtY(), HandleMoveKey(), and MouseFunc(). 00572 { 00573 if (ind >= mText.length()) 00574 return -1; 00575 int pos = mText.find_first_of("\n", (size_t) ind); 00576 if (pos == string::npos) 00577 pos = mText.length(); 00578 if (str!=0) 00579 *str = (pos-ind) ? mText.substr(ind, pos-ind) : ""; 00580 return pos-ind; 00581 }
|