N64® Functions Menu

al - Audio Library Functions
gDP - DP GBI Macros
gdSP - General GBI Macros
gSP - SP GBI Macros
gt - Turbo Microcode RDP
gu - Graphics Utilities
Math - Math Functions
nuSys - NuSystem
os - N64 Operating System
sp - Sprite Library Functions
uh - Host to Target IO
64DD - N64 Disk Drive

Nintendo® Confidential

   

strncmp

Format
#include <string.h>
int strncmp (const char *strl, const char *str2, int n)


Arguments
  • str1 is the pointer to the first character string
  • str2 is the pointer to the second character string
  • n is the number of characters to compare (the length of the string segment)
Return Value
A value less than, equal to, or greater than 0 depending on whether the string segment formed by the first n characters of str1 is lexicographically less than, equal to, or greater than the string segment formed by the first n characters from str2

What This Function Does
It compares at most n characters lexicographically from str1 to at most n characters from str2. The comparison stops with the nth character or a terminating NULL character, whichever occurs first. Call this function to determine which string would be listed first in the dictionary. In other words, this function determines whether the str1 string segment is lexicographically less than, equal to, or greater than the str2 string segment.

Note
This standard function comes with NuSystem.


Nintendo® Confidential

Warning: all information in this document is confidential and covered by a non-disclosure agreement. You are responsible for keeping this information confidential and protected. Nintendo will vigorously enforce this responsibility.


Copyright © 1998
Nintendo of America Inc. All rights reserved
Nintendo and N64 are registered trademarks of Nintendo
Last updated January 1998