Fanuc C-Executer Operating Manual
B-62443EN-3/03E
- 221 -
------------------------------------------------------------------------------
8.9 Compare two strings. <Main,Alarm,Comm>
------------------------------------------------------------------------------
[Name]
strncmp
[Syntax]
#include <string.h>
int strncmp( const char *s1, const char *s2, size_t n ) ;
[Arguments]
s1 Pointer to a string to be compared.
s2 Pointer to a string to be compared.
n Character count to be compared.
[Return]
Returns the comparison result.
Return Comparison result
-----------------+---------------------------
< 0 s1 < s2
= 0 s1 = s2
> 0 s1 > s2
[Description]
Compares "n" characters of a string pointed by "s1" with one by "s2".