GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  NATURALSTRCMP (3)

[Include document man1/alc_contents.mac]

   naturalstrcmp    naturalstrcmp

NAME

naturalstrcmp - compare string in alphabetical order for letters and numerical for digits.

[Include document man1/alc_origin.1]

CONTENTS

Synopsys
Parameters
Description
Return Values
Example
See Also

SYNOPSYS






#include "mut.h"
int naturalstrcmp(s, t)
char *s, *t;


PARAMETERS

s Pointer to the first string to compare
t Pointer to the second string to compare

DESCRIPTION

naturalstrcmp is an alphanumerical comparison function that ensures x12 > x2 for example. First, the alphabetical part of the string is compared, using strcmp(3), then, if it has trailing numbers, they are compared using a numerical function.

RETURN VALUES

naturalstrcmp has the same return values than the standard library strcmp(3) function.

EXAMPLE






#include "mut.h"
static int
   connectorcmp(flc, slc)
locon_list **flc, **slc;
{
   return naturalstrcmp((*slc)->NAME, (*flc)->NAME);
}


SEE ALSO

mbk(1), strcmp(3).

[Include document man1/alc_bug_report.1]

Search for    or go to Top of page |  Section 3 |  Main Index


ASIM/LIP6 NATURALSTRCMP (3) October 1, 1997

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.