String and Block Copy Intrinsics

The following table lists and describes string and block copy intrinsics that you can use on systems based on IA-32 and Intel® 64 architectures. They may invoke library functions that are more highly optimized for Intel® microprocessors than for non-Intel microprocessors.

Note

strncpy() and strncmp() functions are implemented as intrinsics depending on compiler version and compiler switches like optimization level.

Intrinsic

Description

char *_strset(char *, _int32)

Sets all characters in a string to a fixed value.

int memcmp(const void *cs, const void *ct, size_t n)

Compares two regions of memory.

Return:

  • <0 if cs<ct

  • 0 if cs=ct

  • >0 if cs>ct

void *memcpy(void *s, const void *ct, size_t n)

Copies from memory. Returns s.

void *memset(void *s, int c, size_t n)

Sets memory to a fixed value. Returns s.

char *strcat(char *s, const char *ct)

Appends to a string. Returns s.

int strcmp(const char *, const char *)

Compares two strings. Return <0 if cs<ct, 0 if cs=ct, or >0 if cs>ct.

char *strcpy(char *s, const char *ct)

Copies a string. Returns s.

size_t strlen(const char *cs)

Returns the length of string cs.

int strncmp(char *, char *, int)

Compare two strings, but only specified number of characters.

int strncpy(char *, char *, int)

Copies a string, but only specified number of characters.

Para obtener información más completa sobre las optimizaciones del compilador, consulte nuestro Aviso de optimización.