Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Data Structure Conversions
Functions | |
| char * | StringToChar (const std::string &str) |
| Converts a C++ string to C-string; Use free() to release mem after copying the content. | |
| std::string | IntToHex (uint32_t i) |
| Converts an int-type to string-type hex. | |
| std::string | IntToString (int v) |
| Converts an int-type to string. | |
| char * | DoubleToChar (char *str, double v, int decimal_digits) |
| Converts an double-type to a C-string with variable number of decimal places. | |
| int | StringToInt (const std::string &str) |
| Converts a C++ string to an integer. | |
Function Documentation
| char* DoubleToChar | ( | char * | str, |
| double | v, | ||
| int | decimal_digits | ||
| ) |
Converts an double-type to a C-string with variable number of decimal places.
- Parameters:
-
str buffer to store result v value decimal_digits number of decimal places
- Returns:
- Null-terminated charcter array of double value with user-defined number of decimal places
Definition at line 62 of file conversions.cpp.
| std::string IntToHex | ( | uint32_t | i ) |
Converts an int-type to string-type hex.
- Parameters:
-
i Integer to be converted to hex string
- Returns:
- Hexadecimal of string format
Definition at line 34 of file conversions.cpp.
| std::string IntToString | ( | int | v ) |
Converts an int-type to string.
- Parameters:
-
i (int)integer to be converted (std::string)integer
- Returns:
- Integer of string format
Definition at line 47 of file conversions.cpp.
| char* StringToChar | ( | const std::string & | str ) |
Converts a C++ string to C-string; Use free() to release mem after copying the content.
- Parameters:
-
str C++ string
- Returns:
- Pointer to a null-terminated array of character
Definition at line 17 of file conversions.cpp.
| int StringToInt | ( | const std::string & | str ) |
Converts a C++ string to an integer.
- Parameters:
-
str C++ string
- Returns:
- Integer from string representation
Definition at line 105 of file conversions.cpp.
Generated on Tue Jul 26 2022 07:43:19 by
1.7.2