Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

naturalstrcmp(3) [debian man page]

NATURALSTRCMP(3)					       MBK UTILITY FUNCTIONS						  NATURALSTRCMP(3)

NAME
naturalstrcmp - compare string in alphabetical order for letters and numerical for digits. ORIGIN
This software belongs to the ALLIANCE CAD SYSTEM developed by the ASIM team at LIP6 laboratory of Universite Pierre et Marie CURIE, in Paris, France. Web : http://asim.lip6.fr/recherche/alliance/ E-mail : alliance-users@asim.lip6.fr 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). BUG REPORT
This tool is under development at the ASIM department of the LIP6 laboratory. We need your feedback to improve documentation and tools. ASIM
/LIP6 October 1, 1997 NATURALSTRCMP(3)

Check Out this Related Man Page

FREENUM(3)						       MBK UTILITY FUNCTIONS							FREENUM(3)

NAME
freenum - free a num_list ORIGIN
This software belongs to the ALLIANCE CAD SYSTEM developed by the ASIM team at LIP6 laboratory of Universite Pierre et Marie CURIE, in Paris, France. Web : http://asim.lip6.fr/recherche/alliance/ E-mail : alliance-users@asim.lip6.fr SYNOPSYS
#include "mut.h" void freenum(pt) num_list *pt; PARAMETER
pt Pointer to the num list to be freed DESCRIPTION
freenum frees the num_list pointed to by pt. All the elements of the list are put back in the list of free blocks. EXAMPLE
#include "mut.h" void free_from(c, i) /* erase list from ith element */ num_list *c; int i; { num_list *t; while (i--) c = c->NEXT; t = c->NEXT, c->NEXT = NULL; freenum(t); } SEE ALSO
mbk(1), num(3), addnum(3). BUG REPORT
This tool is under development at the ASIM department of the LIP6 laboratory. We need your feedback to improve documentation and tools. ASIM
/LIP6 October 1, 1997 FREENUM(3)
Man Page

4 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

problem in string comparison in shell programming

Hello, was just wondering how to compare strings in unix? I mean as in C there is a function strcmp() in string.h, is there any function in unix for that? I tried using if and all such variations but didn't succeed. Any help would be appreciated. Thanks in advance :) (9 Replies)
Discussion started by: salman4u
9 Replies

2. UNIX for Dummies Questions & Answers

How can I list the file under a directory both in alphabetical and in reverse alphabetical order?

How can I list the file under current directory both in alphabetical and in reverse alphabetical order? (1 Reply)
Discussion started by: g.ashok
1 Replies

3. Shell Programming and Scripting

multiple word check

Hi left value is 1.34 and i want it to compare against 4 right values 2.01, 3.01. 4.09 ,1.11 . This is not numerical comparion. I need for text. I get syntax errors ... value =1.34 --> value will be passed dynamically.. if --> is this correct ? {} else {}fi (2 Replies)
Discussion started by: PrasannaKS
2 Replies

4. UNIX for Beginners Questions & Answers

Need to compare numbers in alphanumeric string

Hi, I will be having file names like below, 1420SP1.01804 1420SP1.01805D 1420SP1.01805 1420SP1.01806D 1420SP1.01806 1420SP1.01901D 1420SP1.01901 1420SP1.01902D 1420SP1.01902 1420SP1.01903D 1420SP1.01903 1420SP1.01904 1420SP1.01905 From this, I need to list file names which is... (3 Replies)
Discussion started by: Sumanthsv
3 Replies