MCPcopy Create free account
hub / github.com/aldelaro5/dolphin-memory-engine / uintStringToU32

Method uintStringToU32

Source/GUI/MemCopy/DlgCopy.cpp:200–212  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

198}
199
200bool DlgCopy::uintStringToU32(const std::string_view str, u32& output)
201{
202 if (!isUnsignedIntegerString(str) || str.empty() || str.length() > 10)
203 return false;
204
205 const auto u{static_cast<u64>(std::stoll(std::string{str}))};
206
207 if (u > ULONG_MAX)
208 return false;
209
210 output = static_cast<u32>(u);
211 return true;
212}
213
214std::string DlgCopy::charToHexString(const char* const input, const size_t count,
215 const DlgCopy::ByteStringFormats format)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected