function

strncmp . string . sncode

VERSIONlatest Comparison of the first n characters.

STRNCMP(1e)

NAME

strncmp - Comparison of the first n characters.

SYNOPSIS

strncmp(str1,str2,len)

PARAMETERS

str1
The first string.
str2
The second string.
len
The length

RETURN

Returns < 0 if str1 is less than str2; > 0 if str1 is greater than str2, and 0 if they are equal.

EXAMPLES

in:  res=<{strncmp("one ","ONE SAMPLE",4)}>.
out: res=32.

in:  res=<{strncmp("ONE ","ONE SAMPLE",4)}>.
out: res=0.

in:  res=<{strncmp("ONE SAMPLE","ONE ",4)}>.
out: res=0.

AUTHOR

Written by Pusnei Sergey and Caroline Laplante, <sergey@sednove.com>