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.
Diff: Misc.cpp
- Revision:
- 1:a46794267da5
- Parent:
- 0:d30c0ebaea12
- Child:
- 2:31917884f2d4
--- a/Misc.cpp Fri Mar 12 01:43:24 2021 +0000 +++ b/Misc.cpp Fri Mar 12 04:14:30 2021 +0000 @@ -8,4 +8,14 @@ tmp = buffer; return tmp; +} +string Misc::itos(int n, int w){ + string tmp; + char buffer[16]; + sprintf(buffer,"%d",n); + tmp = buffer; + while(tmp.length() < w) + tmp += " "; + + return tmp; } \ No newline at end of file