MCPcopy Create free account
hub / github.com/TASEmulators/fceux / HexStringToBytesLength

Function HexStringToBytesLength

src/utils/xstring.cpp:261–266  ·  view source on GitHub ↗

returns -1 if this is not a hex string

Source from the content-addressed store, hash-verified

259
260///returns -1 if this is not a hex string
261int HexStringToBytesLength(const std::string& str)
262{
263 if(str.size()>2 && str[0] == '0' && toupper(str[1]) == 'X')
264 return str.size()/2-1;
265 else return -1;
266}
267
268int Base64StringToBytesLength(const std::string& str)
269{

Callers 1

installValueMethod · 0.85

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected