-
July 14th, 2005, 12:03 PM
#1
_tcstok
Why does _tcstok return lower case?
-
July 14th, 2005, 12:20 PM
#2
Re: _tcstok
It highly depends on your input on what your output will be... So how do you call _tcstok()?
-
July 14th, 2005, 12:42 PM
#3
Re: _tcstok
for example: the input string is "ROGER", the function returns: "roger".
-
July 14th, 2005, 12:57 PM
#4
Re: _tcstok
Originally Posted by MSDN
Returns a pointer to the next token found in strToken. They return NULL when no more tokens are found. Each call modifies strToken by substituting a NULL character for each delimiter that is encountered.
So can please give a full code of how you call your _tcstok() function?
-
July 14th, 2005, 01:26 PM
#5
Re: _tcstok
PTCHAR _getNextToken(void)
{
TCHAR theDelim[] = TEXT(" ");
TCHAR quotedDelim[] = TEXT("\"");
TCHAR *theToken = NULL;
theToken = _tcstok(NULL, theDelim);
if(theToken && theToken[0]==_T('"'))
{
theToken[_tcslen(theToken)] = _T(' ');
theToken++; // skip the leading "
_tcstok(NULL, quotedDelim); // Look for the trailing "
}
return theToken;
}
-
July 15th, 2005, 10:21 AM
#6
Re: _tcstok
Oops, I found a call to: _tcslwr(Command) before _tcstok. Sorry!
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
|