Skip to content

Commit

Permalink
Added ToHexString(length)
Browse files Browse the repository at this point in the history
  • Loading branch information
dimiden committed Nov 14, 2024
1 parent 342e901 commit 818b9b0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/projects/base/ovlibrary/data.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -416,8 +416,13 @@ namespace ov
return String(GetDataAs<const char>(), GetLength());
}

String Data::ToHexString(size_t length) const
{
return ov::ToHexString(GetDataAs<const uint8_t>(), length);
}

String Data::ToHexString() const
{
return ov::ToHexString(GetDataAs<const uint8_t>(), GetLength());
return ToHexString(GetLength());
}
} // namespace ov
1 change: 1 addition & 0 deletions src/projects/base/ovlibrary/data.h
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 818b9b0

Please sign in to comment.