fix SubstVar to be usable as a replace_all method
authorDavid Kalnischkies <david@kalnischkies.de>
Tue, 17 Jun 2014 14:55:19 +0000 (16:55 +0200)
committerDavid Kalnischkies <david@kalnischkies.de>
Wed, 18 Jun 2014 09:17:18 +0000 (11:17 +0200)
commit224dc038412459a5f64d4e7a16845847b7797a67
treecc1aa049369b39b2d723e0aaba6686241bfeeb30
parent99055353a54094034c8a526aa336cd59a039676c
fix SubstVar to be usable as a replace_all method

The name suggests that it is supposed to substitute a variable with a
value, but we tend to use it in a more liberal replace_all() fashion,
but this breaks if either of the parameters is empty or more importantly
if two "variable" occurrences follow each other directly.
apt-pkg/contrib/strutl.cc
test/libapt/strutil_test.cc