Ignore:
Timestamp:
05/19/18 15:46:36 (6 years ago)
Author:
Maciej Komosinski
Message:

Very long string values are not printed shortened

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpp/frams/util/sstringutils.cpp

    r691 r785  
    157157}
    158158
     159SString 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
    159170const char* skipQuoteString(const char* txt, const char* limit)
    160171{
Note: See TracChangeset for help on using the changeset viewer.