how to check string start in C++

后端 未结 12 2020
Happy的楠姐
Happy的楠姐 2020-11-29 03:31

Is there any way in C++ to check whether a string starts with a certain string (smaller than the original) ? Just like we can do in Java

bigString.startswi         


        
12条回答
  •  栀梦
    栀梦 (楼主)
    2020-11-29 04:17

    strstr() returns a pointer to the first occurrence of a string within a string.

提交回复
热议问题