18.08.2013 Views

Fondamenti di Informatica Librerie di funzioni - Robotica

Fondamenti di Informatica Librerie di funzioni - Robotica

Fondamenti di Informatica Librerie di funzioni - Robotica

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Manipolazione <strong>di</strong> stringhe<br />

• void *memcpy (void *dest, void *src, size t n);<br />

copia n byte da partire dall’in<strong>di</strong>rizzo src in dest<br />

• void *memmove (void *dest, void *src, size t n);<br />

copia n bytes dall’in<strong>di</strong>rizzo src a dest, garantendo il corretto<br />

funzionamento nel caso in cui le aree <strong>di</strong> memoria si<br />

sovrappongano<br />

• void *memset (void *s, int c, size t n);<br />

imposta n byte al valore <strong>di</strong> c a partire dall’in<strong>di</strong>rizzo s<br />

• int memcmp (void *s1, void *s2, size t n);<br />

confronta n byte a partire dagli in<strong>di</strong>rizzi s1 e s2<br />

• void *memchr (void *s, int c, size t n);<br />

ricerca il valore c negli n byte che iniziano all’in<strong>di</strong>rizzo s<br />

• char *strcpy (char * dest, char * src);<br />

copia la stringa src in dest<br />

Tullio Facchinetti <strong>Fondamenti</strong> <strong>di</strong> <strong>Informatica</strong> <strong>Librerie</strong> <strong>di</strong> <strong>funzioni</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!