* @brief Returns a pointer to the beginning of the string. * * This function returns a pointer to the first character of the string data. * If the input String is NULL or uninitialized, an error is logged, and the function returns an empty string. * * @param str The String object to retrieve the beginning pointer from. Must not be NULL. * * @return A pointer to the first character in the s
| 1805 | } |
| 1806 | |
| 1807 | |
| 1808 | /** |
| 1809 | * @brief Converts the content of a String object to a double-precision floating-point number. |
| 1810 | * |
| 1811 | * This function converts the content of the given String object to a double-precision floating-point number (double). |
| 1812 | * If the String object is NULL or empty, the function logs an error and returns 0.0. |
| 1813 | * |
| 1814 | * @param str The String object to convert. Must not be NULL. |
| 1815 | * @return The double value of the String object's content, or 0.0 if the String object is NULL or empty. |
| 1816 | */ |
| 1817 | double string_to_double(const String* str) { |
| 1818 | STRING_LOG("[string_to_double]: Function start."); |
| 1819 | |
| 1820 | if (str == NULL) { |
| 1821 | STRING_LOG("[string_to_double]: Error - Null String object."); |
nothing calls this directly
no outgoing calls
no test coverage detected