diff options
author | Michael Vogt <michael.vogt@ubuntu.com> | 2011-07-26 10:49:28 +0200 |
---|---|---|
committer | Michael Vogt <michael.vogt@ubuntu.com> | 2011-07-26 10:49:28 +0200 |
commit | a513ace2d2e3b71d607257990893199c6105b072 (patch) | |
tree | 71610b3a2034dd7cd2d06156baea8df2d8bc989c /apt-pkg/contrib/strutl.h | |
parent | f748b4760d0f8247001c0b46e9eaf02b379bc3c4 (diff) |
* apt-pkg/contrib/strutl.{h,cc}, test/libapt/strutil_test.cc:
- add new DeEscapeString() similar to DeQuoteQuotedWord but
unescape charackter escapes like \0XXX and \xXX (plus add test)
Diffstat (limited to 'apt-pkg/contrib/strutl.h')
-rw-r--r-- | apt-pkg/contrib/strutl.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/apt-pkg/contrib/strutl.h b/apt-pkg/contrib/strutl.h index 89cbf0370..43bbfe366 100644 --- a/apt-pkg/contrib/strutl.h +++ b/apt-pkg/contrib/strutl.h @@ -39,6 +39,10 @@ bool ParseCWord(const char *&String,string &Res); string QuoteString(const string &Str,const char *Bad); string DeQuoteString(const string &Str); string DeQuoteString(string::const_iterator const &begin, string::const_iterator const &end); + +// unescape (\0XXX and \xXX) from a string +string DeEscapeString(string &input); + string SizeToStr(double Bytes); string TimeToStr(unsigned long Sec); string Base64Encode(const string &Str); |