|
-
April 7th, 1999, 03:49 PM
#1
CString Find
I was hoping for some clarification on the CString Find() function. The help that I have states that if you call the function with a second param (int nStart), that character will be excluded from the find. Thus the following code should set i to 5, 11, -1 on the respective steps.
int i =0;
CString Junk = "Hello World Web";
i = Junk.Find(" ", i);
i = Junk.Find(" ", i);
i = Junk.Find(" ", i);
I found that it always returns 5. However, if change to Find(" ", i+1) I get the right values. My guess is that the help is a typo. Have I missed something on this? Maybe a mention of this help error in the String section on CG would be nice.
Thanks
R Pellegrini
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
|