Giter Site home page Giter Site logo

int64string's People

Contributors

djgrrr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

int64string's Issues

integrate it with the String class

Would it be possible to integrate it with the String class?
so that we can use it as follows:

uint64_t count = 10;
String text = "count: " + count;

add string2uint64 and string2int64

example code:

uint64_t string2uint64(const char *str, uint8_t base) {
  uint64_t  result = 0;
  for (int i = 0; str[i] != '\0'; i++)
    result = result * base + str[i] - '0';
  return result;
}

could not convert from 'String' to 'std::__cxx11::string

I dropped the Int64String code verbatim into the build enviroment for ESP32 under ESPHome.

Getting the following compile error when trying to use the code:

src/main.cpp: In lambda function:
src/main.cpp:250:25: error: could not convert 'int64String(int64_t, uint8_t, bool)(10, 1)' from 'String' to 'std::__cxx11::string {aka std::__cxx11::basic_string<char>}'
       return int64String(ESP.getEfuseMac(),10,true);

Any ideas how to fix this please?

Byte order is reversed

Hello,
I was trying to get a String of the 6-byte MAC address of my ESP32 and I found that the byte order is reversed.
The vendor part of ESP MAC addresses is 80:7D:3A which should be in the beginning of the string, but the ouput is 38CDD33A7D80, which puts the byte values correclty but in reverse order.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.