[Coco] "C string searching question

Bill Pierce ooogalapasooo at aol.com
Tue Oct 2 01:06:41 EDT 2012


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

 



More information about the Coco mailing list