| 60 | } |
| 61 | |
| 62 | std::string calc_var_content_string(const calc_var_t &var) { |
| 63 | decltype(&tivars::TypeHandlers::TH_TempEqu::makeStringFromData) func; |
| 64 | // We need to special case some specific temp-equ variables... |
| 65 | if (var.type == CALC_VAR_TYPE_EQU && var.name[0] == '$') { |
| 66 | func = &tivars::TypeHandlers::TH_TempEqu::makeStringFromData; |
| 67 | } else { |
| 68 | func = std::get<1>(tivars::TIVarType::createFromID(static_cast<uint>(var.type)).getHandlers()); |
| 69 | } |
| 70 | const options_t opts = (calc_var_is_prog(&var) || var.type == CALC_VAR_TYPE_STRING) |
| 71 | ? options_t({ {"prettify", true} }) : options_t(); |
| 72 | return func(data_t(var.data, var.data + var.size), opts, nullptr); |
| 73 | } |
| 74 | |
| 75 | int utf8_strlen(const std::string &str) { |
| 76 | if (str.compare("𝑖") == 0 || |
no test coverage detected