summaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorAhmad Fatoum <a.fatoum@pengutronix.de>2024-03-04 20:00:17 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2024-03-05 16:28:06 +0100
commitb823168b76ff9b2ae12730197dd73a06ade728d6 (patch)
treeb536fea9ecfd3d8b5a958bd304a12ea5b72676e7 /include/linux
parent402dae62ce82283bab70da32c06fff4e012e45c9 (diff)
downloadbarebox-b823168b76ff9b2ae12730197dd73a06ade728d6.tar.gz
barebox-b823168b76ff9b2ae12730197dd73a06ade728d6.tar.xz
lib: string: import Linux strreplace helper
This helper replaces all occurrences of a given character in a string. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20240304190038.3486881-93-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/string.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/string.h b/include/linux/string.h
index 32ce569396..0d046f7832 100644
--- a/include/linux/string.h
+++ b/include/linux/string.h
@@ -115,6 +115,7 @@ extern char * skip_spaces(const char *);
extern char *strim(char *);
void *memchr_inv(const void *start, int c, size_t bytes);
+char *strreplace(char *str, char old, char new);
/**
* memzero_explicit - Fill a region of memory (e.g. sensitive