MCPcopy Create free account
hub / github.com/NVIDIAGameWorks/Falcor / decodeURI

Function decodeURI

Source/Falcor/Utils/StringUtils.cpp:170–195  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

168}
169
170std::string decodeURI(const std::string& input)
171{
172 std::string result;
173 for (size_t i = 0; i < input.length(); i++)
174 {
175 if (input[i] == '%')
176 {
177 if (i + 2 < input.length())
178 {
179 std::string hex = input.substr(i + 1, 2);
180 char c = static_cast<char>(strtol(hex.c_str(), nullptr, 16));
181 result += c;
182 i += 2;
183 }
184 }
185 else if (input[i] == '+')
186 {
187 result += ' ';
188 }
189 else
190 {
191 result += input[i];
192 }
193 }
194 return result;
195}
196
197bool parseArrayIndex(const std::string& name, std::string& nonArray, uint32_t& index)
198{

Callers 2

loadTexturesFunction · 0.85
CPU_TESTFunction · 0.85

Calls 1

lengthMethod · 0.45

Tested by 1

CPU_TESTFunction · 0.68