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.
Revision 4:68ef570210d3, committed 2021-03-25
- Comitter:
- khaiminhvn
- Date:
- Thu Mar 25 01:05:14 2021 +0000
- Parent:
- 3:a1a820da71f6
- Commit message:
- Added blank() function
Changed in this revision
Misc.cpp | Show annotated file Show diff for this revision Revisions of this file |
Misc.h | Show annotated file Show diff for this revision Revisions of this file |
--- a/Misc.cpp Tue Mar 23 21:21:11 2021 +0000 +++ b/Misc.cpp Thu Mar 25 01:05:14 2021 +0000 @@ -38,6 +38,14 @@ return tmp; } +//blank +string Misc::blank(int n){ + string out = ""; + for(int i = 0; i < n; i++) + out += " "; + return out; +} + //fill void Misc::fill(int *arr, int val, int size){ for(int i = 0; i < size; i++)
--- a/Misc.h Tue Mar 23 21:21:11 2021 +0000 +++ b/Misc.h Thu Mar 25 01:05:14 2021 +0000 @@ -11,6 +11,7 @@ static string itos(int n, int w); static string itos(float n); static string itos(float n, int w); + static string blank(int n); static void fill(int *arr, int val, int size); };