I don't fully understand the ins-and-outs of Unicode, but I ran into some English text that has a zero-width space and I expected str_squish would remove it. It did not.
Example:
paste0("End of line has a zero-width space",
intToUtf8(x = 0x200B)) |>
stringr::str_squish() |>
stringr::str_detect("\u200B")
## [1] TRUE
Perhaps this should remove them by default, or have a parameter that optionally removes it (and other weird space-like characters).
Thank you for all your hard work!!
I don't fully understand the ins-and-outs of Unicode, but I ran into some English text that has a zero-width space and I expected
str_squishwould remove it. It did not.Example:
Perhaps this should remove them by default, or have a parameter that optionally removes it (and other weird space-like characters).
Thank you for all your hard work!!