kindly help me search a string for 'TAB' (ASCII 9) in a string.
for example string s = "123 abc". as you can see there is space between 123 and abc, and that space is created by the tab button.
how do i search for this tab button? s.find(??????)
Printable View
kindly help me search a string for 'TAB' (ASCII 9) in a string.
for example string s = "123 abc". as you can see there is space between 123 and abc, and that space is created by the tab button.
how do i search for this tab button? s.find(??????)
Reading the reference should be sufficient. http://www.cplusplus.com/reference/string/string/
also tab is not a space. They are different. Use '\t' for a tab.Quote:
string s = "123\tabc";
size_t pos = s.find_first_of("\t");
got it working, u da man