|
-
Aug 7th, 2001, 05:11 AM
#1
Thread Starter
PowerPoster
question about _memicmp C runtime function
I have a stupid question here, I using the following code to compare two string without consider the case.
So my question is, will the _memicmp cause any memmory leak?
PHP Code:
for (idx = 0; idx < 3000; idx++)
{
Ret = _memicmp(BuildRef[idx].Name, Location, strlen(Location));
if (Ret == 0)
{
// Do all my logic here
}
}
regards,
-
Aug 7th, 2001, 01:40 PM
#2
Monday Morning Lunatic
I think stricmp would probably be a better choice for this.
And no, since it doesn't allocate memory it won't leak any.
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
-
Aug 28th, 2001, 07:16 AM
#3
your code wouldn't work anyway, because it would be case-sensitive
All the buzzt
CornedBee
-
Aug 28th, 2001, 11:29 AM
#4
Thread Starter
PowerPoster
yup, it work fr me, 'coa I juz wanna to compare 2 string without consider the upper/lower case.
like:
President Suite is equal to PREsident SuiTE
regards,
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
|