Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!hellgate.utah.edu!cc.utah.edu!inel.gov!gem-hy!cdm From: cdm@gem-hy.Berkeley.EDU (Dale Cook) Newsgroups: comp.lang.c Subject: Re: Comparing strings... Message-ID: <1990Oct16.012056.17200@inel.gov> Date: 16 Oct 90 01:20:56 GMT References: <2205.271700c2@cc.nu.oz.au> Sender: news@inel.gov Reply-To: cdm@gem-hy.Berkeley.EDU (Dale Cook) Organization: Idaho National Engineering Laboratory, Idaho Falls, Idaho Lines: 37 In article <2205.271700c2@cc.nu.oz.au>, v8902058@cc.nu.oz.au writes: |> Hello... |> |> I'm sorry if this is a trival task, but I would like a function that |> compares two strings. I would like to be able to find if a string is equal to, |> less than, or greater than another string. I tried writing a routinue myself, |> but I just can't seem to do it, so I thought I'd ask. |> |> I wouldn't mind some code, or just the basic algorithm maybe. |> |> If anyone can help me, please email or post... |> |> Thanks. |> |> Bernard. Try "strcmp". --- Dale Cook Neither the United States Government nor the Idaho National Engineering Laboratory nor any of their employees, makes any warranty, expressed or implied, or assumes any legal liability or responsibility for the accuracy, completeness, or usefulness of any information, product, or process disclosed, or represents that its use would not infringe privately owned rights. Reference herein to any specific commercial products, process, or service by trade name, trademark manufacturer, or otherwise, does not necessarily constitute or imply its endorsement, recommendation, or favoring by the United States Government or the Idaho National Engineering Laboratory. The views and opinions of authors expressed herein do not necessarily state or reflect those of the United States Government nor the Idaho National Engineering Laboratory, and shall not be used for advertising or product endorsement purposes.