+ 1
How to find index of string in c++
2 odpowiedzi
+ 3
Adding to above:
size_t index= str.find(str1);
It return index of first occurrence of str1 string from owl str string...
Ex:
str="ab cdef" ;
str1="ab" ;
size_t index= str.find(str1);
index=0; //at 0 position...
+ 2
I believe you can access the characters of the string like an array
Such as
String s = "Hello";
char c = str[3];