Page MenuHomePhabricator

abseil-string-find-str-contains should not propose an edit for the three-parameter version of find().

Authored by tdl-g on Aug 10 2021, 8:57 AM.



std::string, std::string_view, and absl::string_view all have a three-parameter version of find()
which has a "count" (or "n") paremeter limiting the size of the substring to search. We don't want
to propose changing to absl::StrContains in those cases. This change fixes that and adds unit tests
to confirm.

Diff Detail

Event Timeline

tdl-g requested review of this revision.Aug 10 2021, 8:57 AM
tdl-g created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptAug 10 2021, 8:57 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
ymandel accepted this revision.Aug 10 2021, 9:10 AM
This revision is now accepted and ready to land.Aug 10 2021, 9:10 AM
This revision was landed with ongoing or failed builds.Aug 10 2021, 9:40 AM
This revision was automatically updated to reflect the committed changes.