Keil Logo Arm Logo

CARM User's Guide

Discontinued

String Routines

Routine Attributes Description
strcat   Concatenates two strings.
strchr reentrant Returns a pointer to the first occurrence of a specified character in a string.
strcmp reentrant Compares two strings.
strcpy reentrant Copies one string to another.
strcspn   Returns the index of the first character in a string that matches any character in a second string.
strlen reentrant Returns the length of a string.
strncat   Concatenates up to a specified number of characters from one string to another.
strncmp   Compares two strings up to a specified number of characters.
strncpy   Copies up to a specified number of characters from one string to another.
strpbrk   Returns a pointer to the first character in a string that matches any character in a second string.
strpos reentrant Returns the index of the first occurrence of a specified character in a string.
strrchr reentrant Returns a pointer to the last occurrence of a specified character in a string.
strrpbrk   Returns a pointer to the last character in a string that matches any character in a second string.
strrpos reentrant Returns the index of the last occurrence of a specified character in a string.
strspn   Returns the index of the first character in a string that does not match any character in a second string.

The string routines are implemented as functions and are prototyped in the string.h include file. They perform the following operations:

  • Copying strings
  • Appending one string to the end of another
  • Comparing two strings
  • Locating one or more characters from a specified set in a string

All string functions operate on null-terminated character strings. Use the buffer manipulation routines to work on non-terminated strings.

Keil logo

Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.