MCPcopy Create free account
hub / github.com/NVIDIA-RTX/Donut / from_string

Function from_string

include/donut/core/string_utils.h:212–219  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

210
211
212 template <typename T> std::optional<T> from_string(std::string const& s)
213 {
214 T value;
215 try { value = sto_number<T>(s); }
216 catch (std::invalid_argument&) { return std::nullopt; }
217 catch (std::out_of_range&) { return std::nullopt; }
218 return value;
219 }
220
221 // generic number & vector parsing
222

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected