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.
Dependents: PIDHeater82 Conceptcontroller_v_1_0 AlarmClockApp COG4050_adxl355_tilt ... more
Misc Class Reference
#include <ttmathmisc.h>
| Static Public Member Functions | |
| static void | AssignString (std::string &result, const char *str) | 
| static void | AssignString (std::wstring &result, const char *str) | 
| static void | AssignString (std::wstring &result, const std::string &str) | 
| static void | AssignString (std::string &result, const wchar_t *str) | 
| static void | AssignString (std::string &result, const std::wstring &str) | 
| static void | AddString (std::string &result, const char *str) | 
| static void | AddString (std::wstring &result, const char *str) | 
| static uint | CharToDigit (uint c) | 
| static sint | CharToDigit (uint c, uint base) | 
| static uint | DigitToChar (uint digit) | 
Detailed Description
some helpful functions
Definition at line 57 of file ttmathmisc.h.
Member Function Documentation
| static void AddString | ( | std::string & | result, | 
| const char * | str | ||
| ) |  [static] | 
result += str
Definition at line 135 of file ttmathmisc.h.
| static void AddString | ( | std::wstring & | result, | 
| const char * | str | ||
| ) |  [static] | 
result += str
Definition at line 146 of file ttmathmisc.h.
| static void AssignString | ( | std::wstring & | result, | 
| const char * | str | ||
| ) |  [static] | 
result = str
Definition at line 83 of file ttmathmisc.h.
| static void AssignString | ( | std::string & | result, | 
| const wchar_t * | str | ||
| ) |  [static] | 
result = str
Definition at line 104 of file ttmathmisc.h.
| static void AssignString | ( | std::string & | result, | 
| const std::wstring & | str | ||
| ) |  [static] | 
result = str
Definition at line 116 of file ttmathmisc.h.
| static void AssignString | ( | std::string & | result, | 
| const char * | str | ||
| ) |  [static] | 
result = str
Definition at line 72 of file ttmathmisc.h.
| static void AssignString | ( | std::wstring & | result, | 
| const std::string & | str | ||
| ) |  [static] | 
result = str
Definition at line 95 of file ttmathmisc.h.
this static method converts one character into its value
for example: 1 -> 1 8 -> 8 A -> 10 f -> 15
this method don't check whether c is correct or not
Definition at line 181 of file ttmathmisc.h.
this method changes a character 'c' into its value (if there can't be a correct value it returns -1)
for example: c=2, base=10 -> function returns 2 c=A, base=10 -> function returns -1 c=A, base=16 -> function returns 10
Definition at line 202 of file ttmathmisc.h.
this method converts a digit into a char digit should be from <0,F> (we don't have to get a base)
for example: 1 -> 1 8 -> 8 10 -> A 15 -> F
Definition at line 236 of file ttmathmisc.h.
Generated on Tue Jul 12 2022 14:03:18 by
 1.7.2
 1.7.2