yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
hex_util.h
Go to the documentation of this file.
1#ifndef YAZE_SRC_CLI_UTIL_HEX_UTIL_H_
2#define YAZE_SRC_CLI_UTIL_HEX_UTIL_H_
3
4#include <cstdint>
5
6#include "absl/strings/string_view.h"
7#include "util/hex.h"
8
9namespace yaze {
10namespace cli {
11namespace util {
12
13// The parser now lives in yaze::util (src/util/hex.h) so core, the editor and
14// the CLI share one implementation instead of three. These aliases keep the
15// existing yaze::cli::util::ParseHexString call sites working.
16//
17// Behaviour change from the previous strtoul-based version: a value that does
18// not fit the requested type is always rejected. The old code relied on
19// `unsigned long`, so on WebAssembly (where it is 32 bits) "-1" wrapped to
20// 0xFFFFFFFF and passed the range check.
22
23} // namespace util
24} // namespace cli
25} // namespace yaze
26
27#endif // YAZE_SRC_CLI_UTIL_HEX_UTIL_H_
bool ParseHexString(absl::string_view str, uint64_t *out)
Definition hex.cc:133