MCPcopy Create free account
hub / github.com/changeofpace/VivienneVMM / StrUnsignedLongLongFromString

Function StrUnsignedLongLongFromString

VivienneCL/string_util.cpp:120–154  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

118
119
120_Use_decl_annotations_
121BOOL
122StrUnsignedLongLongFromString(
123 const std::string& Token,
124 BOOLEAN IsHex,
125 PULONGLONG pValue
126)
127{
128 int Base = IsHex ? 16 : 10;
129 ULONGLONG Value = 0;
130 BOOL status = TRUE;
131
132 //
133 // Zero out parameters.
134 //
135 *pValue = 0;
136
137 try
138 {
139 Value = std::stoull(Token, nullptr, Base);
140 }
141 catch (const std::exception&)
142 {
143 status = FALSE;
144 goto exit;
145 }
146
147 //
148 // Set out parameters.
149 //
150 *pValue = Value;
151
152exit:
153 return status;
154}
155
156
157_Use_decl_annotations_

Callers 5

ParseProcessIdTokenFunction · 0.85
ParseAddressTokenFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected