ANNOUNCEMENT: Live Wireshark University & Allegro Packets online APAC Wireshark Training Session
July 17th, 2024 | 10:00am-11:55am SGT (UTC+8) | Online

Wireshark-dev: Re: [Wireshark-dev] [Wireshark-commits] rev 32597: /trunk/epan/dissectors/ /trun

From: Guy Harris <guy@xxxxxxxxxxxx>
Date: Thu, 29 Apr 2010 11:41:43 -0700
On Apr 29, 2010, at 7:38 AM, morriss@xxxxxxxxxxxxx wrote:

> http://anonsvn.wireshark.org/viewvc/viewvc.cgi?view=rev&revision=32597
> 
> User: morriss
> Date: 2010/04/29 07:38 AM
> 
> Log:
> Use strchr() instead of index()--Windows doesn't appear to have the latter.

Some older System V's also might not have the latter, although, these days, most UN*Xes have both.

(V7 had index() and rindex(), and BSD came from that stream; System III, and possibly the earlier USG/USDL UNIXes, renamed them to strchr() and strrchr().  As indicated, most UN*Xes these days offer both, to support building software written for both flavors.

The ANSI C standard went with strchr() and strrchr(), so that's what should be used in any case.)