Chapter 3. Basic C Library Functions

Table of Contents

String Conversions
String Manipulation
Bit Operations

When writing drivers, you cannot in general use routines which are from the C Library. Some of the functions have been found generally useful and they are listed below. The behaviour of these functions may vary slightly from those defined by ANSI, and these deviations are noted in the text.

String Conversions

simple_strtoll — convert a string to a signed long long
simple_strtoul — convert a string to an unsigned long
simple_strtol — convert a string to a signed long
simple_strtoull — convert a string to an unsigned long long
strict_strtoul — convert a string to an unsigned long strictly
strict_strtol — convert a string to a long strictly
strict_strtoull — convert a string to an unsigned long long strictly
strict_strtoll — convert a string to a long long strictly
vsnprintf — Format a string and place it in a buffer
vscnprintf — Format a string and place it in a buffer
snprintf — Format a string and place it in a buffer
scnprintf — Format a string and place it in a buffer
vsprintf — Format a string and place it in a buffer
sprintf — Format a string and place it in a buffer
vsscanf — Unformat a buffer into a list of arguments
sscanf — Unformat a buffer into a list of arguments