aboutsummaryrefslogtreecommitdiff
path: root/libbb/replace.c
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2025-08-15 09:00:13 +0100
committerRon Yorston <rmy@pobox.com>2025-08-15 09:00:13 +0100
commit01ff9c492111cf7d51ad074629d6e72bc69fc149 (patch)
tree394973e4e5f25dcd638185be75b84430c39ebab2 /libbb/replace.c
parent9a2d9345377d38c428df6d3e0887956d359807ab (diff)
parent8bde71eb1502a5cdf186769b47d470038f99bc95 (diff)
downloadbusybox-w32-01ff9c492111cf7d51ad074629d6e72bc69fc149.tar.gz
busybox-w32-01ff9c492111cf7d51ad074629d6e72bc69fc149.tar.bz2
busybox-w32-01ff9c492111cf7d51ad074629d6e72bc69fc149.zip
Merge branch 'busybox' into merge
Diffstat (limited to 'libbb/replace.c')
-rw-r--r--libbb/replace.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/libbb/replace.c b/libbb/replace.c
index 6183d3e6f..bc26b04cc 100644
--- a/libbb/replace.c
+++ b/libbb/replace.c
@@ -46,3 +46,17 @@ char* FAST_FUNC xmalloc_substitute_string(const char *src, int count, const char
46 //dbg_msg("subst9:'%s'", buf); 46 //dbg_msg("subst9:'%s'", buf);
47 return buf; 47 return buf;
48} 48}
49
50#if 0 /* inlined in libbb.h */
51/* Returns strlen as a bonus */
52size_t FAST_FUNC replace_char(char *str, char from, char to)
53{
54 char *p = str;
55 while (*p) {
56 if (*p == from)
57 *p = to;
58 p++;
59 }
60 return p - str;
61}
62#endif