Zilog ZUSBOPTS Manual de usuario Pagina 455

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 520
  • Tabla de contenidos
  • SOLUCIÓN DE PROBLEMAS
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 454
UM017105-0511 Standard Functions
Zilog Developer Studio II – ZNEO™
User Manual
427
memchr
Locates the first occurrence of c (converted to an unsigned char) in the initial n charac-
ters of the object pointed to by s.
Synopsis
#include <string.h>
void *memchr(const void *s, int c, size_t n);
Returns
A pointer to the located character or a null pointer if the character does not occur in the
object.
Example
char *p1;
char str[]="COMPASS";
c='p';
p1=memchr(str,c,sizeof(char));
memcmp
Compares the first n characters of the object pointed to by s2 to the object pointed to by s1.
Synopsis
#include <string.h>
int memcmp(const void *s1, const void *s2, size_t n);
Returns
An integer greater than, equal to, or less than zero, according as the object pointed to by s1
is greater than, equal to, or less than the object pointed to by s2.
Example
char s1[]="COMPASS";
char s2[]="IDE";
int res;
res=memcmp(s1, s2, sizeof (char));
Vista de pagina 454
1 2 ... 450 451 452 453 454 455 456 457 458 459 460 ... 519 520

Comentarios a estos manuales

Sin comentarios