diff options
author | Michael Vogt <mvo@debian.org> | 2013-09-07 16:16:49 +0200 |
---|---|---|
committer | Michael Vogt <mvo@debian.org> | 2013-09-07 16:16:49 +0200 |
commit | 9572a54bbc96eb653b3e13260abb183ba7a316f3 (patch) | |
tree | cb7ec7bb67833a7cce5425e355cd7cc49acd5c25 /apt-pkg/contrib/strutl.h | |
parent | cd4ee27de851910dd84067c45d487c5460641913 (diff) |
doc update
Diffstat (limited to 'apt-pkg/contrib/strutl.h')
-rw-r--r-- | apt-pkg/contrib/strutl.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/apt-pkg/contrib/strutl.h b/apt-pkg/contrib/strutl.h index 944f91403..080f9f82e 100644 --- a/apt-pkg/contrib/strutl.h +++ b/apt-pkg/contrib/strutl.h @@ -62,11 +62,17 @@ bool StrToNum(const char *Str,unsigned long &Res,unsigned Len,unsigned Base = 0) bool StrToNum(const char *Str,unsigned long long &Res,unsigned Len,unsigned Base = 0); bool Base256ToNum(const char *Str,unsigned long &Res,unsigned int Len); bool Hex2Num(const std::string &Str,unsigned char *Num,unsigned int Length); + +// input changing string split bool TokSplitString(char Tok,char *Input,char **List, unsigned long ListMax); + +// split a given string by a char std::vector<std::string> VectorizeString(std::string const &haystack, char const &split) __attrib_const; -// like python string.split -std::vector<std::string> StringSplit(std::string const &haystack, std::string const &sep, unsigned int maxsplit=0) __attrib_const; + +// split a given string by a string token +std::vector<std::string> StringSplit(std::string const &input, std::string const &sep, unsigned int maxsplit=0) __attrib_const; + void ioprintf(std::ostream &out,const char *format,...) __like_printf(2); void strprintf(std::string &out,const char *format,...) __like_printf(2); char *safe_snprintf(char *Buffer,char *End,const char *Format,...) __like_printf(3); |