Skip to main content
Header: ar_osal/api/ar_osal_string.h

Functions

ar_strlen

ar_strlen Get the length of the string.
Parameters
const char_t *
NULL terminated string buffer pointer.
size_t
String buffer size in bytes.
Returns Number of characters in the string, not including the terminating null character. If there is no null terminator in the buffer, provided string buffer size is returned to indicate the error.

ar_strcpy

ar_strcpy Copies character from source to destination string.
Parameters
str_dest: Destination string buffer.
size_t
Size in characters.
const char_t *
Source string to copy from.
size_t
Size in characters to copy from source string.
Returns 0 Success Nonzero Failure note: Always null terminator is appended to the destination and string truncation will occur if destination size is smaller or equal to characters copy size.

ar_strcmp

ar_strcmp Compare characters in two given strings.
Parameters
const char_t *
Null terminated string 1
const char_t *
Null terminated string 2
size_t
number of characters to compare.
Returns 0 str1 < str2 0 str1 == str2 0 str1 > str2

ar_strcat

ar_strcat Append character from source to destination string.
Parameters
str_dest: Destination string buffer.
size_t
Size in characters.
const char_t *
Source string to copy from.
size_t
Size in characters to append from source string.
Returns 0 Success Nonzero Failure note: Always null terminator is appended to the destination after concatenation and string truncation will occur if destination size is smaller or equal to source.

ar_strstr

ar_strstr Search string in string.
Parameters
const char_t *
Null terminated string
Null terminated string to search for.
Returns Pointer to the first occurrence of str_search in str. NULL- if not found.

Macros

ar_sprintf

ar_sprintf Write formated data to a string.

ar_sscanf