Lines Matching refs:needle

600   size_t rfind(const std::string& needle) const {  in rfind()
601 size_t pos = console.rfind(needle); // exact match? in rfind()
606 if (needle.length() > pos) return std::string::npos; in rfind()
607 pos -= needle.length(); in rfind()
610 if (numError(pos, needle) != std::string::npos) return pos; in rfind()
618 size_t find(const std::string& needle, size_t start = 0) const { in find() argument
620 if (needle.length() > console.length()) return std::string::npos; in find()
621 const size_t last_pos = console.length() - needle.length(); in find()
624 if (numError(pos, needle) != std::string::npos) return pos; in find()
634 bool correctForBitError(std::string& reason, const std::string& needle) { in correctForBitError() argument
636 if (reason.length() < needle.length()) return corrected; in correctForBitError()
638 const size_t last_pos = reason.length() - needle.length(); in correctForBitError()
639 for (size_t pos = 0; pos <= last_pos; pos += needle.length()) { in correctForBitError()
640 pos = console.find(needle, pos); in correctForBitError()
644 if (needle == reason.substr(pos, needle.length())) continue; in correctForBitError()
647 reason = reason.substr(0, pos) + needle + reason.substr(pos + needle.length()); in correctForBitError()
655 bool correctForBitErrorOrUnderline(std::string& reason, const std::string& needle) { in correctForBitErrorOrUnderline() argument
656 bool corrected = correctForBitError(reason, needle); in correctForBitErrorOrUnderline()
657 std::string _needle(needle); in correctForBitErrorOrUnderline()
660 if (needle != _needle) { in correctForBitErrorOrUnderline()