Is there a reverse function for strstr

后端 未结 17 2384
闹比i
闹比i 2020-12-18 18:28

I am trying to find a similar function to strstr that searches a substring starting from the end towards the beginning of the string.

17条回答
  •  萌比男神i
    2020-12-18 19:24

    No. This is one of the places that the C++ std::string class has an obvious advantage -- along with std::string::find(), there's also std::string::rfind().

提交回复
热议问题