src/utils_subst.[ch]: Implement `subst_string'.
authorFlorian Forster <octo@leeloo.lan.home.verplant.org>
Sat, 20 Dec 2008 15:54:32 +0000 (16:54 +0100)
committerFlorian Forster <octo@leeloo.lan.home.verplant.org>
Sat, 20 Dec 2008 15:54:32 +0000 (16:54 +0100)
commit088d5c6d5a5ea3457cd6a4eafff40f5c780c3692
treef7ce1b2a1d22c878990a66ceed9cd4258f808fa6
parent1aaedbca424b623f83a4f6cf837cf91574fe0e67
src/utils_subst.[ch]: Implement `subst_string'.

Works like `subst', but instead of specifying start and end offsets you
specify `needle', the string that is to be replaced. If `needle' is found
in `string' (using strstr(3)), the offset is calculated and `subst' is
called with the determined parameters.
src/utils_subst.c
src/utils_subst.h