Functions | |
| template<typename IndexType > | |
| requires constexpr std::is_integral_v< IndexType > bool | checkOverflow (IndexType a, IndexType b) |
| bool | safeStrToInt (const std::string &s, int &result) |
| bool | safeStrToUInt (const std::string &s, unsigned int &result) |
| template<typename ScalarType > | |
| requires std::is_scalar_v< ScalarType > bool | safeStrToScalar (const std::string &s, ScalarType &result) |
| std::string | escapeForShell (const std::string &input) |
|
constexpr |
|
inline |
Escape a string for safe use in a shell double-quoted context. Escapes: backslash, backtick, dollar, double-quote, and newline.
| requires std::is_scalar_v<ScalarType> bool sofa::type::hardening::safeStrToScalar | ( | const std::string & | s, |
| ScalarType & | result | ||
| ) |