RTEMS 6.3
Loading...
Searching...
No Matches
Conversion Helpers

Files

file  cpukit/include/rtems/stringto.h
 Convert String to Pointer (with validation).
file  cpukit/libmisc/stringto/stringtodouble.c
 Convert String to Double (with validation).
file  cpukit/libmisc/stringto/stringtofloat.c
 Convert String to Float (with validation).
file  cpukit/libmisc/stringto/stringtoint.c
 Convert String to Int (with validation).
file  cpukit/libmisc/stringto/stringtolong.c
 Convert String to Long (with validation).
file  cpukit/libmisc/stringto/stringtolongdouble.c
 Convert String to long double (with validation).
file  cpukit/libmisc/stringto/stringtolonglong.c
 Convert String to Long Long (with validation).
file  cpukit/libmisc/stringto/stringtopointer.c
 Convert String to Pointer (with validation).
file  cpukit/libmisc/stringto/stringtounsignedchar.c
 Convert String to Unsigned Character (with validation).
file  cpukit/libmisc/stringto/stringtounsignedint.c
 Convert String to Unsigned Int (with validation).
file  cpukit/libmisc/stringto/stringtounsignedlong.c
 Convert String to Unsigned Long Long (with validation).
file  cpukit/libmisc/stringto/stringtounsignedlonglong.c
 Convert String to Unsigned Long Long (with validation).

Functions

rtems_status_code rtems_string_to_pointer (const char *s, void **n, char **endptr)
 Convert String to Pointer (with validation).
rtems_status_code rtems_string_to_unsigned_char (const char *s, unsigned char *n, char **endptr, int base)
 Convert String to Unsigned Character (with validation).
rtems_status_code rtems_string_to_int (const char *s, int *n, char **endptr, int base)
 Convert String to Int (with validation).
rtems_status_code rtems_string_to_unsigned_int (const char *s, unsigned int *n, char **endptr, int base)
 Convert String to Unsigned Int (with validation).
rtems_status_code rtems_string_to_long (const char *s, long *n, char **endptr, int base)
 Convert String to Long (with validation).
rtems_status_code rtems_string_to_unsigned_long (const char *s, unsigned long *n, char **endptr, int base)
 Convert String to Unsigned Long (with validation).
rtems_status_code rtems_string_to_long_long (const char *s, long long *n, char **endptr, int base)
 Convert String to Long Long (with validation).
rtems_status_code rtems_string_to_unsigned_long_long (const char *s, unsigned long long *n, char **endptr, int base)
 Convert String to Unsigned Long Long (with validation).
rtems_status_code rtems_string_to_float (const char *s, float *n, char **endptr)
 Convert String to Float (with validation).
rtems_status_code rtems_string_to_double (const char *s, double *n, char **endptr)
 Convert String to Double (with validation).
rtems_status_code rtems_string_to_long_double (const char *s, long double *n, char **endptr)
 Convert String to long double (with validation).

Detailed Description

Function Documentation

◆ rtems_string_to_double()

rtems_status_code rtems_string_to_double ( const char * s,
double * n,
char ** endptr )

Convert String to Double (with validation).

This method converts a string to a double with range validation.

Parameters
[in]sis the string to convert
[in]npoints to the variable to place the converted output in
[in]endptris used to keep track of the position in the string
Return values
Thismethod returns RTEMS_SUCCESSFUL on successful conversion and *n is filled in. Otherwise, the status indicates the source of the error.

◆ rtems_string_to_float()

rtems_status_code rtems_string_to_float ( const char * s,
float * n,
char ** endptr )

Convert String to Float (with validation).

This method converts a string to a float with range validation.

Parameters
[in]sis the string to convert
[in]npoints to the variable to place the converted output in
[in]endptris used to keep track of the position in the string
Return values
Thismethod returns RTEMS_SUCCESSFUL on successful conversion and *n is filled in. Otherwise, the status indicates the source of the error.

◆ rtems_string_to_int()

rtems_status_code rtems_string_to_int ( const char * s,
int * n,
char ** endptr,
int base )

Convert String to Int (with validation).

This method converts a string to an int with range validation.

Parameters
[in]sis the string to convert
[in]npoints to the variable to place the converted output in
[in]endptris used to keep track of the position in the string
[in]baseis the expected base of the number
Return values
Thismethod returns RTEMS_SUCCESSFUL on successful conversion and *n is filled in. Otherwise, the status indicates the source of the error.

◆ rtems_string_to_long()

rtems_status_code rtems_string_to_long ( const char * s,
long * n,
char ** endptr,
int base )

Convert String to Long (with validation).

This method converts a string to a long with range validation.

Parameters
[in]sis the string to convert
[in]npoints to the variable to place the converted output in
[in]endptris used to keep track of the position in the string
[in]baseis the expected base of the number
Return values
Thismethod returns RTEMS_SUCCESSFUL on successful conversion and *n is filled in. Otherwise, the status indicates the source of the error.

◆ rtems_string_to_long_double()

rtems_status_code rtems_string_to_long_double ( const char * s,
long double * n,
char ** endptr )

Convert String to long double (with validation).

This method converts a string to a long double with range validation.

Parameters
[in]sis the string to convert
[in]npoints to the variable to place the converted output in
[in]endptris used to keep track of the position in the string
Return values
Thismethod returns RTEMS_SUCCESSFUL on successful conversion and *n is filled in. Otherwise, the status indicates the source of the error.

◆ rtems_string_to_long_long()

rtems_status_code rtems_string_to_long_long ( const char * s,
long long * n,
char ** endptr,
int base )

Convert String to Long Long (with validation).

This method converts a string to a long long with range validation.

Parameters
[in]sis the string to convert
[in]npoints to the variable to place the converted output in
[in]endptris used to keep track of the position in the string
[in]baseis the expected base of the number
Return values
Thismethod returns RTEMS_SUCCESSFUL on successful conversion and *n is filled in. Otherwise, the status indicates the source of the error.

◆ rtems_string_to_pointer()

rtems_status_code rtems_string_to_pointer ( const char * s,
void ** n,
char ** endptr )

Convert String to Pointer (with validation).

This method converts a string to a pointer (void *) with basic numeric validation.

Parameters
[in]sis the string to convert
[in]npoints to the variable to place the converted output in
[in]endptris used to keep track of the position in the string
Return values
Thismethod returns RTEMS_SUCCESSFUL on successful conversion and *n is filled in. Otherwise, the status indicates the source of the error.

◆ rtems_string_to_unsigned_char()

rtems_status_code rtems_string_to_unsigned_char ( const char * s,
unsigned char * n,
char ** endptr,
int base )

Convert String to Unsigned Character (with validation).

This method converts a string to an unsigned character with range validation.

Parameters
[in]sis the string to convert
[in]npoints to the variable to place the converted output in
[in]endptris used to keep track of the position in the string
[in]baseis the expected base of the number
Return values
Thismethod returns RTEMS_SUCCESSFUL on successful conversion and *n is filled in. Otherwise, the status indicates the source of the error.

◆ rtems_string_to_unsigned_int()

rtems_status_code rtems_string_to_unsigned_int ( const char * s,
unsigned int * n,
char ** endptr,
int base )

Convert String to Unsigned Int (with validation).

This method converts a string to an unsigned int with range validation.

Parameters
[in]sis the string to convert
[in]npoints to the variable to place the converted output in
[in]endptris used to keep track of the position in the string
[in]baseis the expected base of the number
Return values
Thismethod returns RTEMS_SUCCESSFUL on successful conversion and *n is filled in. Otherwise, the status indicates the source of the error.

◆ rtems_string_to_unsigned_long()

rtems_status_code rtems_string_to_unsigned_long ( const char * s,
unsigned long * n,
char ** endptr,
int base )

Convert String to Unsigned Long (with validation).

This method converts a string to an unsigned long with range validation.

Parameters
[in]sis the string to convert
[in]npoints to the variable to place the converted output in
[in]endptris used to keep track of the position in the string
[in]baseis the expected base of the number
Return values
Thismethod returns RTEMS_SUCCESSFUL on successful conversion and *n is filled in. Otherwise, the status indicates the source of the error.

◆ rtems_string_to_unsigned_long_long()

rtems_status_code rtems_string_to_unsigned_long_long ( const char * s,
unsigned long long * n,
char ** endptr,
int base )

Convert String to Unsigned Long Long (with validation).

This method converts a string to an unsigned character with range validation.

Parameters
[in]sis the string to convert
[in]npoints to the variable to place the converted output in
[in]endptris used to keep track of the position in the string
[in]baseis the expected base of the number
Return values
Thismethod returns RTEMS_SUCCESSFUL on successful conversion and *n is filled in. Otherwise, the status indicates the source of the error.