Is there a reverse function for strstr

后端 未结 17 2342
闹比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条回答
  •  抹茶落季
    2020-12-18 19:23

    I don't believe there is in the c string lib, but it would be trivial to write your own, On one condition, you know the length of the string or it is properly terminated.

提交回复
热议问题