From 2a60689a33a61f000bd90596b1289babcb861cd9 Mon Sep 17 00:00:00 2001 From: Arnaldo Carvalho de Melo Date: Wed, 26 Jun 2019 12:24:03 -0300 Subject: tools lib: Adopt strreplace() from the kernel We'll use it to further reduce the size of tools/perf/util/string.c, replacing the strxfrchar() equivalent function we have there. Cc: Adrian Hunter Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-x3r61ikjrso1buygxwke8id3@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- tools/include/linux/string.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'tools/include') diff --git a/tools/include/linux/string.h b/tools/include/linux/string.h index e436f8037c87..a76d4df10435 100644 --- a/tools/include/linux/string.h +++ b/tools/include/linux/string.h @@ -19,6 +19,8 @@ extern size_t strlcpy(char *dest, const char *src, size_t size); char *str_error_r(int errnum, char *buf, size_t buflen); +char *strreplace(char *s, char old, char new); + /** * strstarts - does @str start with @prefix? * @str: string to examine -- cgit v1.2.3