xxh128_hash_to_string #829

Closed
opened 2023-04-13 11:20:32 -05:00 by Nitr0-G · 0 comments
Nitr0-G commented 2023-04-13 11:20:32 -05:00 (Migrated from github.com)

Hello everyone.
I wrote a fast function to translate a XXH128_hash_t into a string for C++, maybe I'll save someone time.

std::string xxh128_hash_to_string(XXH128_hash_t hash) {
     char buf[33];
     snprintf(buf, sizeof(buf), "%016llx%016llx", (unsigned long long)hash.high64, (unsigned long long)hash.low64);
     return std::string(buf);
 }
Hello everyone. I wrote a fast function to translate a XXH128_hash_t into a string for C++, maybe I'll save someone time. ``` std::string xxh128_hash_to_string(XXH128_hash_t hash) { char buf[33]; snprintf(buf, sizeof(buf), "%016llx%016llx", (unsigned long long)hash.high64, (unsigned long long)hash.low64); return std::string(buf); } ```
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
gh-Cyan4973/xxHash#829
No description provided.