MCPcopy Create free account
hub / github.com/DFHack/dfhack / string_to_int

Function string_to_int

library/include/MiscUtils.h:451–458  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

449}
450
451static inline int string_to_int(const std::string s, int default_ = 0) {
452 try {
453 return std::stoi(s);
454 }
455 catch (std::exception&) {
456 return default_;
457 }
458}
459
460// trim from start
461static inline std::string &ltrim(std::string &s) {

Callers 9

get_entity_idFunction · 0.85
load_zone_assignmentsFunction · 0.85
load_associationsFunction · 0.85
load_noble_mapFunction · 0.85
do_commandFunction · 0.85
hotkeys_cmdFunction · 0.85
do_commandFunction · 0.85
deserialize_vector_idsFunction · 0.85
deserializeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected