Developer Guide and Reference

Contents

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.
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.

Product and Performance Information

1

Intel's compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors. These optimizations include SSE2, SSE3, and SSSE3 instruction sets and other optimizations. Intel does not guarantee the availability, functionality, or effectiveness of any optimization on microprocessors not manufactured by Intel. Microprocessor-dependent optimizations in this product are intended for use with Intel microprocessors. Certain optimizations not specific to Intel microarchitecture are reserved for Intel microprocessors. Please refer to the applicable product User and Reference Guides for more information regarding the specific instruction sets covered by this notice.

Notice revision #20110804