3.1.4. String manipulation

Table 3.4 contains a summary of the string manipulation macros.

Table 3.4. String manipulation

DescriptionSee
Converts a string to an integeratoi
Converts a string to a long integeratol
Converts a string to an unsigned long integeratoul
Checks if a character is digitisdigit
Checks if a character is lower caseislower
Checks if a character is a printable charisprint
Checks if a character is spaceisspace
Checks if a character is upper caseisupper
Converts an int to a stringitoa

Concatenates two strings

strcat

Locates the first occurrence of a character in a string

strchr

Compares two strings

strcmp

Copies a string

strcpy

Performs string comparison without case distinction

stricmp

Returns string length

strlen

Performs limited comparison of two strings

strncmp
Converts a string to lowercase charactersstrtolower
Converts a string to uppercase charactersstrtoupper
Removes any starting and trailing white spaces and tabs from a stringstrtrim
Converts a character to lowercasetolower
Converts a character to uppercasetoupper

Copyright © 2002-2010 ARM Limited. All rights reserved.ARM DUI 0175M
Non-ConfidentialID102410