| 1837 | // Format numbers |
| 1838 | |
| 1839 | String RemoteDebug::formatNumber(uint32_t value, uint8_t size, char insert) { |
| 1840 | |
| 1841 | // Putting zeroes in left |
| 1842 | |
| 1843 | String ret = ""; |
| 1844 | |
| 1845 | for (uint8_t i = 1; i <= size; i++) { |
| 1846 | uint32_t max = pow(10, i); |
| 1847 | if (value < max) { |
| 1848 | for (uint8_t j = (size - i); j > 0; j--) { |
| 1849 | ret.concat(insert); |
| 1850 | } |
| 1851 | break; |
| 1852 | } |
| 1853 | } |
| 1854 | |
| 1855 | ret.concat(value); |
| 1856 | |
| 1857 | return ret; |
| 1858 | } |
| 1859 | |
| 1860 | #ifndef WEBSOCKET_DISABLED // For web socket server (app) |
| 1861 |
nothing calls this directly
no outgoing calls
no test coverage detected