Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: arduino/ArduinoCore-API
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 3b88acac8^
Choose a base ref
...
head repository: arduino/ArduinoCore-API
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 0d83f1afc3367037dbde5323c2abd0ae1bd2c583
Choose a head ref
  • 5 commits
  • 2 files changed
  • 1 contributor

Commits on Jan 25, 2021

  1. Make String::concat(const char *, unsigned int) public

    This method is useful when receiving data from external sources that
    pass an explicit length instead of a NUL-terminated string.
    matthijskooijman committed Jan 25, 2021
    Configuration menu
    Copy the full SHA
    3b88aca View commit details
    Browse the repository at this point in the history
  2. Add String(char *, unsigned) constructor

    This constructor allows converting a buffer containing a
    non-nul-terminated string to a String object, by explicitely passing the
    length.
    matthijskooijman committed Jan 25, 2021
    Configuration menu
    Copy the full SHA
    8431488 View commit details
    Browse the repository at this point in the history
  3. Don't mess with the original in String::substring

    Before, substring would (temporarily) add a \0 in the original string at
    the end of the substring, so the substring could be copied into a new
    String object. However, now that the String::copy() method can work with
    non-nul-terminated strings (by passing an explicit length), this trick
    is not needed and we can just call the copy method instead.
    matthijskooijman committed Jan 25, 2021
    Configuration menu
    Copy the full SHA
    dd236bf View commit details
    Browse the repository at this point in the history
  4. Add String::concat(const uint8_t *, unsigned int) version

    This just calls the char* version, but allows calling the method with a
    uint8_t* as well (which is not uncommon for buffers).
    matthijskooijman committed Jan 25, 2021
    Configuration menu
    Copy the full SHA
    eaab14d View commit details
    Browse the repository at this point in the history
  5. Add String(const uint8_t *, unsigned int) constructor

    This allows creating a String from a uint8_t[] or uint8_t* as well,
    without having to add explicit casts.
    matthijskooijman committed Jan 25, 2021
    Configuration menu
    Copy the full SHA
    0d83f1a View commit details
    Browse the repository at this point in the history
Loading