How can Extract String ?
-
Hi all, I have any string in given format:: "string1-string2 string3" i want to fetch string1 that is comes before sign "-",so please tell me how can i do this? is solve when i use findstring function. please help me. if possible please explain with example. thanks in advance.
IN A DAY, WHEN YOU DON'T COME ACROSS ANY PROBLEMS - YOU CAN BE SURE THAT YOU ARE TRAVELLING IN A WRONG PATH
-
Hi all, I have any string in given format:: "string1-string2 string3" i want to fetch string1 that is comes before sign "-",so please tell me how can i do this? is solve when i use findstring function. please help me. if possible please explain with example. thanks in advance.
IN A DAY, WHEN YOU DON'T COME ACROSS ANY PROBLEMS - YOU CAN BE SURE THAT YOU ARE TRAVELLING IN A WRONG PATH
CString::Tokenize
// Example with CAtlString from MSDN CAtlString str( "%First Second#Third" ); CAtlString resToken; int curPos= 0; resToken= str.Tokenize("% #",curPos); while (resToken != "") { printf("Resulting token: %s\n", resToken); resToken= str.Tokenize("% #",curPos); };
By the way don't you have MSDN installed?:confused:
Somethings seem HARD to do, until we know how to do them. ;-)_AnShUmAn_
-
CString::Tokenize
// Example with CAtlString from MSDN CAtlString str( "%First Second#Third" ); CAtlString resToken; int curPos= 0; resToken= str.Tokenize("% #",curPos); while (resToken != "") { printf("Resulting token: %s\n", resToken); resToken= str.Tokenize("% #",curPos); };
By the way don't you have MSDN installed?:confused:
Somethings seem HARD to do, until we know how to do them. ;-)_AnShUmAn_
_AnShUmAn_ wrote:
By the way don't you have MSDN installed?
why installed ? it is online, and I doubt the poster writes here by telepathy... ;P
[VisualCalc][Binary Guide][CommDialogs] | [Forums Guidelines]
-
_AnShUmAn_ wrote:
By the way don't you have MSDN installed?
why installed ? it is online, and I doubt the poster writes here by telepathy... ;P
[VisualCalc][Binary Guide][CommDialogs] | [Forums Guidelines]
The MSDN site may be blocked :laugh: LOL
Somethings seem HARD to do, until we know how to do them. ;-)_AnShUmAn_
-
The MSDN site may be blocked :laugh: LOL
Somethings seem HARD to do, until we know how to do them. ;-)_AnShUmAn_
bahhh, ask google !
[VisualCalc][Binary Guide][CommDialogs] | [Forums Guidelines]
-
Hi all, I have any string in given format:: "string1-string2 string3" i want to fetch string1 that is comes before sign "-",so please tell me how can i do this? is solve when i use findstring function. please help me. if possible please explain with example. thanks in advance.
IN A DAY, WHEN YOU DON'T COME ACROSS ANY PROBLEMS - YOU CAN BE SURE THAT YOU ARE TRAVELLING IN A WRONG PATH
If you're not using a string class, there's always
_tcstok()
--Mike-- Visual C++ MVP :cool: LINKS~! CP SearchBar v3.0 | C++ Forum FAQ "That's what's great about doing user interface work. No matter what you do, people will say that what you did was idiotic." -- Raymond Chen
-
If you're not using a string class, there's always
_tcstok()
--Mike-- Visual C++ MVP :cool: LINKS~! CP SearchBar v3.0 | C++ Forum FAQ "That's what's great about doing user interface work. No matter what you do, people will say that what you did was idiotic." -- Raymond Chen
or sscanf() ... He did say the string always had the exact same format ...