Skip to content

Commit

Permalink
OrcLib: Text: Hex: add ToHexString
Browse files Browse the repository at this point in the history
  • Loading branch information
fabienfl-orc committed Apr 27, 2023
1 parent e45e36a commit f4e5171
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/OrcLib/Text/Hex.h
Original file line number Diff line number Diff line change
Expand Up @@ -168,5 +168,13 @@ OutputIt ToHex(InputIt first, InputIt last, OutputIt out)
return out;
}

template <typename OutputCharT = char>
std::basic_string<OutputCharT> ToHexString(std::string_view buffer)
{
std::basic_string<OutputCharT> output;
ToHex(std::cbegin(buffer), std::cend(buffer), std::back_inserter(output));
return output;
}

} // namespace Text
} // namespace Orc

0 comments on commit f4e5171

Please sign in to comment.