Zilog Z80380 Manual do Utilizador Página 79

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 116
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 78
UM004001-COR1103 4–15
Run Time Environment Library Functions
strcmp FUNCTION
Header file statement: #include <string.h>
Syntax: int strcmp (const char *string1, const char *string2);
The strcmp function compares string1 and string2 lexicographically and returns a value indi-
cating their relationship, as follows:
Value Meaning
< 0 string1 less than string2
= 0 string1 identical to string2
> 0 string1 greater than string2
The strcmp function operates on null-terminated strings. The string arguments to these func-
tions are expected to contain a null character (‘\0’) marking the end of the string.
Note that two strings containing characters located between ‘Z’ and ‘a’ in the ASCII table
(‘[’, ‘\’_’]’, ‘^’, ‘_’, and ‘‘’) compare differently depending on their case. For example, the
two strings, "ABCDE" and "ABCD^", compare one way if the comparison is lowercase
("abcde" > "abcd^") and compare the other way ("ABCDE" < "ABCD^") if it is uppercase.
Return Value
The return values for this functions are described above.
Parameter Description
string1
String to compare
string2
String to compare
Vista de página 78
1 2 ... 74 75 76 77 78 79 80 81 82 83 84 ... 115 116

Comentários a estes Manuais

Sem comentários