diff options
author | Michael Vogt <michael.vogt@ubuntu.com> | 2009-06-29 18:23:07 +0200 |
---|---|---|
committer | Michael Vogt <michael.vogt@ubuntu.com> | 2009-06-29 18:23:07 +0200 |
commit | fa3b09450ed3da175f619ca77d9dceb9a6f81972 (patch) | |
tree | 606631d6259b0a74d9f0cd12cd6c59dc4cc88cfe /apt-pkg/contrib/strutl.cc | |
parent | 2d403b92011c6e4a317a48284e7c68952ce5ddcd (diff) |
merge r1797 from lp:~donkult/apt/experimental
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 a69cf01ec..61c582b85 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 |