-
-
Notifications
You must be signed in to change notification settings - Fork 19.2k
Open
Description
@Alvaro-Kothe implemented a really nice PR in #62658 (comment) with a copy_string_without_char
function to remove the separator from a numeric string
We also have a function _str_copy_decimal_str_c
at
pandas/pandas/_libs/src/parser/tokenizer.c
Line 1741 in 5eaf80b
static char *_str_copy_decimal_str_c(const char *s, char **endpos, char decimal, |
- allocates a buffer on the heap
- supports replacement of multiple characters
- reads and writes per-byte
It would be nice to combine both of these functions into one and take advantage of their individual strengths, utlimately getting a function that can replace multiple characters into a caller-provided buffer (ideally on the stack), and which moves blocks of memory instead of individual characters, where applicable.
strtok_s
/ strtok
seem like they could be really useful here, or alternatively strpbrk
Metadata
Metadata
Assignees
Labels
No labels