[Coco] "C string searching question
Retro Canada
retrocanada76 at gmail.com
Tue Oct 2 01:15:52 EDT 2012
damn touchscreen well try to build some hash list or ant other shortcut algorithm O(x^2) will seem pretty good with 100 entries bad with 200 and come back tomorrow after i finish to search 500*500 strings :P
Sent from my iPhone
On 2012-10-02, at 1:06 AM, Bill Pierce <ooogalapasooo at aol.com> wrote:
>
> Mark,
> I just did some searching through klib.l manual and the string functions there are:
>
> strcat, strucat, strncat, strcmp, strucmp, strncmp, struncmp, strcpy, strucpy, strncpy, strlen, strchr, strrchr, strpbrk, strspn, strcspn, strtok, strclr, strend, reverse, pwcryp, index, rindex
>
> there's no strstr.
>
> Bill P
>
> Music from the Tandy/Radio Shack Color Computer 2 & 3
> https://sites.google.com/site/dabarnstudio/
> Bill Pierce
> ooogalapasooo at aol.com
>
>
>
>
> -----Original Message-----
> From: Mark McDougall <msmcdoug at iinet.net.au>
> To: CoCoList for Color Computer Enthusiasts <coco at maltedmedia.com>
> Sent: Tue, Oct 2, 2012 12:37 am
> Subject: Re: [Coco] "C string searching question
>
>
> On 2/10/2012 2:01 PM, Bill Pierce wrote:
>
>> <I don't suppose you have access to library functions like strlen() and
>> <strchr() and strstr() in that context, do you?
>>
>> Yes, they are supported.
>
> Replace the inner loop with:
> if (strstr (records[cnt].recname, srchstr))
>
> Regards,
>
> --
> | Mark McDougall | "Electrical Engineers do it
> | <http://members.iinet.net.au/~msmcdoug> | with less resistance!"
>
> --
> Coco mailing list
> Coco at maltedmedia.com
> http://five.pairlist.net/mailman/listinfo/coco
>
>
>
> --
> Coco mailing list
> Coco at maltedmedia.com
> http://five.pairlist.net/mailman/listinfo/coco
More information about the Coco
mailing list