Skip to content

Releases: jit89/embedded-view-utils

v1.1.0

14 Feb 07:01
45a2b16

Choose a tag to compare

This release significantly matures the StringView and MemoryView utility classes, focusing on type safety, and better integration with the standard Arduino environment.

🚀 Key Features

1. Seamless String Comparisons

You can now compare StringView objects directly with string literals and Arduino String objects using the == operator. This eliminates the need for manual casting or .equals() calls.

  • if (myView == "command")
  • if ("literal" == myView) (Symmetric comparison)
  • if (myView == arduinoString)

2. Expanded Search API

Added multiple contains() and indexOf() overloads to make pattern matching more intuitive:

  • contains(): Easily check for substrings using StringView, String, or char*.
  • indexOf(const char*): Find the starting position of a string literal directly.

3. High-Precision Numeric Parsing

Replaced basic atof logic with a more robust implementation:

  • toDouble(): New method utilizing strtod for full double-precision parsing.
  • Refactored toFloat(): Now acts as a wrapper for toDouble(), ensuring consistent parsing logic across types.

🛠️ Internal Improvements & Bug Fixes

  • Fixed Method Shadowing: Added using declarations to ensure that overloads in StringView do not hide the generic indexOf and contains methods from the MemoryView base class.
  • Improved Performance: Internal search overloads now minimize temporary object creation.
  • Cleaned Up Documentation: All methods are now fully documented with Doxygen-style comments for better IDE intellisense support.

📦 Installation

Replace your existing Views.h with the version included in this release.

#include "Views.h"

void process(StringView data) {
    if (data.contains("ERROR")) {
        Serial.println(data.trim());
    }
}

v1.0.0

13 Feb 15:58
bc2f733

Choose a tag to compare