esp32/BLE-Scan/Utilities.cpp
// parse string data from wordtimeapi for current time's seconds
// TODO: replace with json parsing
parse string data from wordtimeapi for current time's seconds
TODO: replace with json parsing
parse string data from wordtimeapi for current time ' s seconds TODO : replace with json parsing
int Utilities::parsePayload (String p) {
  String res = "";
  int i = 4;
  while (p.substring(i - 4, i) != "time") {
    ++i;
  }
  i += 19;
  res = res + p.charAt(i);
  res = res + p.charAt(i + 1);
  return res.toInt();
}
int Utilities :: parsePayload ( String p ) { String res = " " ; int i = 4 ; while ( p . substring ( i - 4 , i ) != " " ) { ++ i ; } i += 19 ; res = res + p . charAt ( i ) ; res = res + p . charAt ( i + 1 ) ; return res . toInt ( ) ; }
parse string data from wordtimeapi for current time's seconds
TODO: replace with json parsing
parse string data from wordtimeapi for current time ' s seconds TODO : replace with json parsing