Sponsored Content
Full Discussion: A little help please
Top Forums Shell Programming and Scripting A little help please Post 302145575 by immyakram on Wednesday 14th of November 2007 04:38:34 PM
Old 11-14-2007
yes i have been through variables.

enter after the leading $

str1=abcd
test $str1 = abcd

then what can i do after this to get my exit result of 0.
 
STRNATCASECMP(3)							 1							  STRNATCASECMP(3)

strnatcasecmp - Case insensitive string comparisons using a ";natural order" algorithm

SYNOPSIS
int strnatcasecmp (string $str1, string $str2) DESCRIPTION
This function implements a comparison algorithm that orders alphanumeric strings in the way a human being would. The behaviour of this function is similar to strnatcmp(3), except that the comparison is not case sensitive. For more information see: Martin Pool's Natural Order String Comparison page. PARAMETERS
o $str1 - The first string. o $str2 - The second string. RETURN VALUES
Similar to other string comparison functions, this one returns < 0 if $str1 is less than $str2 > 0 if $str1 is greater than $str2, and 0 if they are equal. SEE ALSO
preg_match(3), strcmp(3), strcasecmp(3), substr(3), stristr(3), strncasecmp(3), strncmp(3), strstr(3), setlocale(3). PHP Documentation Group STRNATCASECMP(3)
All times are GMT -4. The time now is 08:34 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy