commonFunctions.ino 353 B

1234567891011121314151617181920
  1. /*#include <string.h>
  2. #include <ctype.h>*/
  3. char *strlwr(char *str)
  4. {
  5. unsigned char *p = (unsigned char *)str;
  6. while (*p)
  7. {
  8. *p = tolower((unsigned char)*p);
  9. p++;
  10. }
  11. return str;
  12. }
  13. double round2(double value) {
  14. return round(value * 100) / 100.0;
  15. }
  16. double round1(double value) {
  17. return round(value * 10) / 10.0;
  18. }