| 144 | }; |
| 145 | |
| 146 | std::string StringToString(void *obj, int /*expandMembers*/, CDebugger * /*dbg*/) |
| 147 | { |
| 148 | std::string *val = reinterpret_cast<std::string*>(obj); |
| 149 | std::stringstream s; |
| 150 | s << "(len=" << val->length() << ") \""; |
| 151 | // TODO: How to allow user to define how many characters in the string that should be expanded? |
| 152 | if( val->length() < 20 ) |
| 153 | s << *val << "\""; |
| 154 | else |
| 155 | s << val->substr(0, 20) << "..."; |
| 156 | return s.str(); |
| 157 | } |
| 158 | |
| 159 | std::string ArrayToString(void *obj, int expandMembers, CDebugger *dbg) |
| 160 | { |