feat: Added option to copy custom encoding strings from hex view

This commit is contained in:
WerWolv
2023-01-28 21:12:35 +01:00
parent c861bf9a5e
commit c6e1f45dc3
5 changed files with 25 additions and 2 deletions

View File

@@ -5,6 +5,7 @@
#include <map>
#include <string_view>
#include <vector>
#include <span>
#include <hex/helpers/fs.hpp>
#include <hex/helpers/file.hpp>
@@ -21,7 +22,7 @@ namespace hex {
EncodingFile() = default;
EncodingFile(Type type, const std::fs::path &path);
[[nodiscard]] std::pair<std::string_view, size_t> getEncodingFor(const std::vector<u8> &buffer) const;
[[nodiscard]] std::pair<std::string_view, size_t> getEncodingFor(std::span<u8> buffer) const;
[[nodiscard]] size_t getLongestSequence() const { return this->m_longestSequence; }
[[nodiscard]] bool valid() const { return this->m_valid; }