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_utf8.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_utf8.h')
-rw-r--r--source/blender/blenlib/BLI_string_utf8.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/blenlib/BLI_string_utf8.h b/source/blender/blenlib/BLI_string_utf8.h
index 3e599865416..18eff6737c8 100644
--- a/source/blender/blenlib/BLI_string_utf8.h
+++ b/source/blender/blenlib/BLI_string_utf8.h
@@ -69,7 +69,9 @@ int BLI_str_utf8_char_width_safe(const char *p) ATTR_NONNULL();
size_t BLI_str_partition_utf8(const char *str, const unsigned int delim[], char **sep, char **suf) ATTR_NONNULL();
size_t BLI_str_rpartition_utf8(const char *str, const unsigned int delim[], char **sep, char **suf) ATTR_NONNULL();
-size_t BLI_str_partition_ex_utf8(const char *str, const unsigned int delim[], char **sep, char **suf, const bool from_right) ATTR_NONNULL();
+size_t BLI_str_partition_ex_utf8(
+ const char *str, const char *end, const unsigned int delim[], char **sep, char **suf, const bool from_right)
+ ATTR_NONNULL(1, 3, 4, 5);
#define BLI_UTF8_MAX 6 /* mem */
#define BLI_UTF8_WIDTH_MAX 2 /* columns */