+ 2
Is it possible to cut string?
like string str = "Hello", str2; //And i want to str2 = "ell"(2,3,4 words of str)?
3 Answers
+ 7
Maybe you can use substr
https://code.sololearn.com/cZ69Vd6g5ouh/?ref=app
+ 6
You can just extract what you want from str1 and store it in str2.
http://www.cplusplus.com/reference/string/string/substr/
0
you can use the substring method as:
str.substring(startIndex,endIndex)
Note that Index starts from 0 and also keep in mind that startIndex is inclusive where as endIndex is exclusive.