From 818b9b0d3611d931ea1b70b18e257a86410451fb Mon Sep 17 00:00:00 2001 From: Dimiden Date: Thu, 14 Nov 2024 20:52:09 +0900 Subject: [PATCH] Added ToHexString(length) --- src/projects/base/ovlibrary/data.cpp | 7 ++++++- src/projects/base/ovlibrary/data.h | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/projects/base/ovlibrary/data.cpp b/src/projects/base/ovlibrary/data.cpp index 80a8fafe7..618d99374 100644 --- a/src/projects/base/ovlibrary/data.cpp +++ b/src/projects/base/ovlibrary/data.cpp @@ -416,8 +416,13 @@ namespace ov return String(GetDataAs(), GetLength()); } + String Data::ToHexString(size_t length) const + { + return ov::ToHexString(GetDataAs(), length); + } + String Data::ToHexString() const { - return ov::ToHexString(GetDataAs(), GetLength()); + return ToHexString(GetLength()); } } // namespace ov \ No newline at end of file diff --git a/src/projects/base/ovlibrary/data.h b/src/projects/base/ovlibrary/data.h index 9b1d6181e..93ccba821 100644 --- a/src/projects/base/ovlibrary/data.h +++ b/src/projects/base/ovlibrary/data.h @@ -202,6 +202,7 @@ namespace ov String Dump(const char *title, const char *line_prefix) const noexcept; String Dump(const char *title, off_t offset = 0, size_t max_bytes = 1024, const char *line_prefix = nullptr) const noexcept; String ToString() const; + String ToHexString(size_t length) const; String ToHexString() const; protected: