- Timestamp:
- 05/19/18 15:46:36 (7 years ago)
- Location:
- cpp/frams/util
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
cpp/frams/util/extvalue.cpp
r753 r785 309 309 case TInt: case TDouble: case TString: case TObj: 310 310 msg += " '"; 311 msg += getString();311 msg += sstringShorten(getString(), 30); 312 312 msg += "'"; 313 313 default:; -
cpp/frams/util/sstringutils.cpp
r691 r785 157 157 } 158 158 159 SString sstringShorten(const SString &in, int maxlen) 160 { 161 SString out; 162 if (in.len() > maxlen) 163 out = in.substr(0, maxlen / 2) + "..." + in.substr(in.len() - maxlen + maxlen / 2) + SString::sprintf(" (length %d)", in.len()); 164 else 165 out = in; 166 sstringQuote(out); 167 return out; 168 } 169 159 170 const char* skipQuoteString(const char* txt, const char* limit) 160 171 { -
cpp/frams/util/sstringutils.h
r691 r785 19 19 bool strContainsOneOf(const char* str, const char* chars); 20 20 bool sstringQuote(SString& target); 21 SString sstringShorten(const SString &in, int maxlen); 21 22 const char* skipQuoteString(const char* txt, const char* limit); 22 23 int sstringUnquote(SString &target);
Note: See TracChangeset
for help on using the changeset viewer.