7.5.8 Character string operation functions

Character string operation functions are as follows.

Table 7.10

Character String Operation Functions

Function/Macro Name

Outline

memcpy

Memory copy

memmove

Memory move

strcpy

Character string copy

strncpy

Character string copy (with number of characters specified)

strcat

Character string concatenation

strncat

Character string concatenation (with number of characters specified)

memcmp

Memory comparison

strcmp

Character string comparison

strncmp

Character string comparison (with number of characters specified)

memchr

Memory search

strchr

Character string search (start position of specified character)

strcspn

Character string search (maximum length not including specified character)

strpbrk

Character string search (start position)

strrchr

Character string search (end position)

strspn

Character string search (maximum length including specified character)

strstr

Character string search (start position of specified character string)

strtok

Token division

memset

Initialization of an object

strerror

Obtain error message corresponding to error number

strlen

Length of character string