mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-04-01 21:17:44 -05:00
feat: Allow pasting of bytes with prefixes and comma separators
Closes #581
This commit is contained in:
@@ -630,6 +630,11 @@ namespace hex::plugin::builtin {
|
||||
if (clipboard.empty())
|
||||
return;
|
||||
|
||||
// Remove common hex prefixes and commas
|
||||
hex::replaceStrings(clipboard, "0x", "");
|
||||
hex::replaceStrings(clipboard, "0X", "");
|
||||
hex::replaceStrings(clipboard, ",", "");
|
||||
|
||||
// Check for non-hex characters
|
||||
bool isValidHexString = std::find_if(clipboard.begin(), clipboard.end(), [](char c) {
|
||||
return !std::isxdigit(c) && !std::isspace(c);
|
||||
|
||||
Reference in New Issue
Block a user