diff options
author | Michael Vogt <michael.vogt@ubuntu.com> | 2009-07-30 15:31:39 +0200 |
---|---|---|
committer | Michael Vogt <michael.vogt@ubuntu.com> | 2009-07-30 15:31:39 +0200 |
commit | 57722714255118560c98b3245413ff5f693b993c (patch) | |
tree | 48f4e1c25d7fd07bdbec6e7effa792739c157402 /apt-pkg/contrib/strutl.cc | |
parent | 8dfb8a0ab2c2a06e319678701c144e5156d7e869 (diff) | |
parent | d5752e18bed18c706c93f5c43c61016c72132ede (diff) |
merged from debian-sid
Diffstat (limited to 'apt-pkg/contrib/strutl.cc')
-rw-r--r-- | apt-pkg/contrib/strutl.cc | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/apt-pkg/contrib/strutl.cc b/apt-pkg/contrib/strutl.cc index 0b1bc3c98..a991b8988 100644 --- a/apt-pkg/contrib/strutl.cc +++ b/apt-pkg/contrib/strutl.cc @@ -387,6 +387,17 @@ string SubstVar(string Str,const struct SubstVar *Vars) return Str; } /*}}}*/ +// OutputInDepth - return a string with separator multiplied with depth /*{{{*/ +// --------------------------------------------------------------------- +/* Returns a string with the supplied separator depth + 1 times in it */ +std::string OutputInDepth(const unsigned long Depth, const char* Separator) +{ + std::string output = ""; + for(unsigned long d=Depth+1; d > 0; d--) + output.append(Separator); + return output; +} + /*}}}*/ // URItoFileName - Convert the uri into a unique file name /*{{{*/ // --------------------------------------------------------------------- /* This converts a URI into a safe filename. It quotes all unsafe characters |