FindStrInStr only finds "prefix" strings.  That is to say, it only searches the 
beginning of "words".  I.e., 

True:  FindStrInStr("the rain in spain", "spa", &pos)
False:  FindStrInStr("the rain in spain", "ain", &pos)

Additionally, the search string must be "normalized".

-bob mckenzie, palmsource pdx

-----Original Message-----
From: Barry Peet [mailto:barry@;yucat.com]
Sent: Monday, October 21, 2002 8:27 AM
To: Palm Developer Forum
Subject: strange FindStrInStr behaviour..


I'm using FindStrInStr to find a string in another string... It ALWAYS
returns false, although I definitively know the searched for string IS in
the searched string...

My code:

match = MatchPerson (p, strSearchText);

Boolean MatchPerson (PersonDetailsType *p, Char *strToFind)
{
    if (p->LastName &&
                         FindStrInStr(p->LastName,strToFind)
                    return true;
    else
                    return false;
}

Anyone has any idea what could be the cause of this problem?

Regards,

Barry



-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/


--
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/

Reply via email to