S60 Open C
Standard C Library/String Functions

Standard C Library/String Functions

Table of Contents

String Functions

 


String Functions

Arithmetic Functions

Function

Description

strtod Converts ASCII string to floating point number
strtol Converts a string to a long integer
strtoul Converts a string to an unsigned long integer
strtoimax, strtoumax Converts a string to an integer
strtof Converts an ASCII string to a floating point number
strtol Converts a string to a long integer
strtoull Converts a string to an unsigned long integer
strtoq Converts a string to a long integer
strtouq Converts a string to an unsigned long integer
strtold Converts an ASCII string to a floating point number

Time Functionalities

Function Description
strptime Converts a string representation of time to a time tm structure
strftime Format date and time

Collation Functions

Function

Description

strcoll Compares two strings using the current locale
strxfrm String transformation

Error Messages

Function

Description

perror Describes a system or MySQL error code
strerror_r Returns string describing error code
strerror Returns string describing error code

Locale

Function

Description

strfmon Converts monetary value to a string

Compatibility String Search Functions

Function

Description

index Locates character in string
rindex Locates character in string

Copying and Concatenation

Function

Description

memccpy Copies memory area
bcopy Copies byte sequence
bzero Writes zero bytes
memcpy Copies memory area
memmove Copies memory area
memset Fills memory with a constant byte
strcat Concatenates two strings
strcpy Copies the string src to dst (including the terminating ‘\0’ character).
strdup, strndup Duplicates a string
strncat Concatenates two strings
strncpy Copies a string
stpcpy Copies a string returning a pointer to its end

Finding Tokens in a String

Function

Description

strtok_r, strtok Extracts tokens from strings
strsep Extracts tokens from strings

Search Functions

Function

Description

strpbrk Searches a string for any of a set of characters
strspn Searches a string for a set of characters
memchr Scans memory for a character
strchr, strrchr Locates the first occurrence of c (converted to a char ) in the string pointed to by s.
strcspn Searches a string for a set of characters
strcasestr Locates the first occurrence of the null-terminated string little in the null-terminated string big, but ignores the case of both strings.
strstr Locates a substring

String Length

Function

Description

strlen Calculates the length of a string
strnlen Determines the length of a fixed-size string

String/Array Comparison

Function

Description

memcmp Compares memory areas
bcmp Compares byte sequences
strcmp, strncmp Compares two strings
strcasecmp, strncasecmp Compares two strings ignoring case

Give feedback of this article


©Nokia 2007

Back to top


This material, including documentation and any related computer programs, is protected by copyright controlled by Nokia. All rights are reserved. Copying, including reproducing, storing, adapting or translating, any or all of this material requires the prior written consent of Nokia. This material also contains confidential information, which may not be disclosed to others without the prior written consent of Nokia.

Nokia is a registered trademark of Nokia Corporation. S60 and logo is a trademark of Nokia Corporation. Java and all Java-based marks are trademarks or registered trademarks of Sun Microsystems, Inc. Other company and product names mentioned herein may be trademarks or tradenames of their respective owners.