WIP: Vulkan: Workbench #107886

Closed
Jeroen Bakker wants to merge 88 commits from Jeroen-Bakker:vulkan-draw-manager-workbench into main

When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.
2 changed files with 25 additions and 0 deletions
Showing only changes of commit 75a93813e5 - Show all commits

View File

@ -114,6 +114,16 @@ size_t BLI_strcpy_rlen(char *__restrict dst, const char *__restrict src) ATTR_WA
char *BLI_strncat(char *__restrict dst, const char *__restrict src, size_t dst_maxncpy)
ATTR_NONNULL(1, 2);
/**
* A version of `strchr` that returns the end of the string (point to `\0`)
* if the character is not found.
*
* Useful for stepping over newlines up until the last line.
*/
const char *BLI_strchr_or_end(const char *str,
char ch) ATTR_WARN_UNUSED_RESULT ATTR_RETURNS_NONNULL
ATTR_NONNULL(1);
/**
* Return the range of the quoted string (excluding quotes) `str` after `prefix`.
*

View File

@ -988,6 +988,21 @@ size_t BLI_strnlen(const char *s, const size_t maxlen)
/** \} */
/* -------------------------------------------------------------------- */
/** \name String Scanning
* \{ */
const char *BLI_strchr_or_end(const char *str, const char ch)
{
const char *p = str;
while (!ELEM(*p, ch, '\0')) {
p++;
}
return p;
}
/** \} */
/* -------------------------------------------------------------------- */
/** \name String Case Conversion
* \{ */