String to number conversion implementation. More...
#include "utils/conversion.h"
Functions | |
| int32_t | str_to_int (const char *s) |
| Convert string to 32-bit signed integer. | |
| float | str_to_float (const char *s) |
| Convert string to floating-point number. | |
String to number conversion implementation.
This file provides functions for converting string representations of numbers to their corresponding integer and floating-point values. The implementation handles:
| float str_to_float | ( | const char * | s | ) |
Convert string to floating-point number.
Convert a string to a floating-point number.
| [in] | s | Pointer to null-terminated input string |
Parses the input string to construct a float value:
| int32_t str_to_int | ( | const char * | s | ) |
Convert string to 32-bit signed integer.
Convert a string to a 32-bit signed integer.
| [in] | s | Pointer to null-terminated input string |
Parses the input string character by character to construct the integer value: