diff options
Diffstat (limited to 'source/blender/blenlib/BLI_string.h')
-rw-r--r-- | source/blender/blenlib/BLI_string.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/source/blender/blenlib/BLI_string.h b/source/blender/blenlib/BLI_string.h index bf93dc19cc5..53563f85eb9 100644 --- a/source/blender/blenlib/BLI_string.h +++ b/source/blender/blenlib/BLI_string.h @@ -68,6 +68,18 @@ char *BLI_strdupn(const char *str, int len); */ char *BLI_strncpy(char *dst, const char *src, int maxncpy); + /** + * Returns a copy of the cstring @a str into a newly mallocN'd + * string with all instances of oldText replaced with newText, + * and returns it. + * + * @param str The string to replace occurances of oldText in + * @param oldText The text in the string to find and replace + * @param newText The text in the string to find and replace + * @retval Returns the duplicated string + */ +char *BLI_replacestr(char *str, const char *oldText, const char *newText); + /* * Replacement for snprintf */ |