Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Montagne <montagne29@wanadoo.fr>2015-06-27 11:22:29 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2015-06-27 11:24:54 +0300
commit4d043c99dc49022e10a940b26ed9bc469581926f (patch)
tree3e9ed33fa07b11378ce3af0824c2557e850a13ce /source/blender/blenlib/BLI_string.h
parente78b03f9e9bb8aaba7c02c9f5d26a85ddfe2079c (diff)
Extend `BLI_str_partition_ex`: add possibility to define a right limit to the string.
Now you can define `end` pointer as right limit of the string (allows to easily search in substring, especially useful when searching from right).
Diffstat (limited to 'source/blender/blenlib/BLI_string.h')
-rw-r--r--source/blender/blenlib/BLI_string.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/blenlib/BLI_string.h b/source/blender/blenlib/BLI_string.h
index e6c1cc8b4b6..a94777d278b 100644
--- a/source/blender/blenlib/BLI_string.h
+++ b/source/blender/blenlib/BLI_string.h
@@ -92,7 +92,9 @@ bool BLI_strn_endswith(const char *__restrict str, const char *__restrict end, s
size_t BLI_str_partition(const char *str, const char delim[], char **sep, char **suf) ATTR_NONNULL();
size_t BLI_str_rpartition(const char *str, const char delim[], char **sep, char **suf) ATTR_NONNULL();
-size_t BLI_str_partition_ex(const char *str, const char delim[], char **sep, char **suf, const bool from_right) ATTR_NONNULL();
+size_t BLI_str_partition_ex(
+ const char *str, const char *end, const char delim[], char **sep, char **suf, const bool from_right)
+ ATTR_NONNULL(1, 3, 4, 5);
#ifdef __cplusplus
}