|
Ruby 3.4.1p0 (2024-12-25 revision 48d4efcb85000e1ebae42004e963b5d0cedddcf2)
|
A custom memchr implementation. More...
Go to the source code of this file.
Functions | |
| void * | pm_memchr (const void *source, int character, size_t number, bool encoding_changed, const pm_encoding_t *encoding) |
| We need to roll our own memchr to handle cases where the encoding changes and we need to search for a character in a buffer that could be the trailing byte of a multibyte character. | |
A custom memchr implementation.
Definition in file pm_memchr.h.
| void * pm_memchr | ( | const void * | source, |
| int | character, | ||
| size_t | number, | ||
| bool | encoding_changed, | ||
| const pm_encoding_t * | encoding ) |
We need to roll our own memchr to handle cases where the encoding changes and we need to search for a character in a buffer that could be the trailing byte of a multibyte character.
| source | The source string. |
| character | The character to search for. |
| number | The maximum number of bytes to search. |
| encoding_changed | Whether the encoding changed. |
| encoding | A pointer to the encoding. |
Definition at line 11 of file pm_memchr.c.