SW500008 Microchip Technology, SW500008 Datasheet - Page 283

PICC-18 STD

SW500008

Manufacturer Part Number
SW500008
Description
PICC-18 STD
Manufacturer
Microchip Technology
Type
Compilerr
Series
PIC18r
Datasheets

Specifications of SW500008

Supported Families
PIC18
Core Architecture
PIC
Software Edition
Standard
Kit Contents
Software And Docs
Mcu Supported Families
PIC18
Tool Function
Compiler
Tool Type
Compiler
Lead Free Status / RoHS Status
Not applicable / RoHS Compliant
For Use With/related Products
PIC18 Series
Lead Free Status / Rohs Status
Lead free / RoHS Compliant
Other names
015
778-1001
778-1001
Library Functions
STRNCMP, STRNICMP
Synopsis
Description
The strncmp() function compares its two, null terminated, string arguments, up to a maximum of n
characters, and returns a signed integer to indicate whether s1 is less than, equal to or greater than s2.
The comparison is done with the standard collating sequence, which is that of the ASCII character
set.
Example
See Also
strlen(), strcmp(), strcpy(), strcat()
The strnicmp() function is the case-insensitive version of this function.
#include <string.h>
int strncmp (const char * s1, const char * s2, size_t n)
int strnicmp (const char * s1, const char * s2, size_t n)
#include <stdio.h>
#include <string.h>
void
main (void)
{
}
int i;
i = strcmp("abcxyz", "abcxyz");
if(i == 0)
else if(i > 0)
else
printf("Both strings are equal\n");
printf("String 2 less than string 1\n");
printf("String 2 is greater than string 1\n");
269

Related parts for SW500008