-
May 18th, 2010, 07:39 PM
#1
Tab ascii
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(??????)
-
May 18th, 2010, 07:52 PM
#2
Re: Tab ascii
Originally Posted by l3ecl
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/
string s = "123\tabc";
size_t pos = s.find_first_of("\t");
also tab is not a space. They are different. Use '\t' for a tab.
-
May 18th, 2010, 10:23 PM
#3
Re: Tab ascii
Last edited by l3ecl; May 18th, 2010 at 11:55 PM.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|