Releases: jit89/embedded-view-utils
Releases · jit89/embedded-view-utils
v1.1.0
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 usingStringView,String, orchar*.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 utilizingstrtodfor full double-precision parsing.- Refactored
toFloat(): Now acts as a wrapper fortoDouble(), ensuring consistent parsing logic across types.
🛠️ Internal Improvements & Bug Fixes
- Fixed Method Shadowing: Added
usingdeclarations to ensure that overloads inStringViewdo not hide the genericindexOfandcontainsmethods from theMemoryViewbase 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
Full Changelog: https://github.com/jit89/embedded-view-utils/commits/v1.0.0