omni::extras::stringToInt2
Defined in omni/extras/StringHelpers.h
- 
inline bool omni::extras::stringToInt2(const std::string &str, carb::Int2 &outResult, const char *delims = kInt2Delimiters)
- Converts a string value to an Int2 representation, that is, a two-component vector. - This function attempts to convert values such as - 0,-1or- 99x84into a carb::Int2. The delimiters given by- delimsare tried in order, passed along with- strto split(). If two components are found, both components must successfully parse with stringToInteger() in order to consider the result valid.- Warning - See the warnings at stringToInteger() about potential data loss. - Parameters
- str – The string to convert 
- outResult – [out] Reference that receives the carb::Int2 result from parsing. Only valid if - trueis returned.
- delims – Delimiters to separate the vector components 
 
- Returns
- trueif parsing was successful;- falseotherwise