gagolews / stringi

Fast and portable character string processing in R (with the Unicode ICU)
https://stringi.gagolewski.com/
Other
304 stars 44 forks source link

stri_dup, stri_paste, ... should fail more graciously on attempts to generate strings of length >= 2^31 each #397

Closed gagolews closed 2 years ago

gagolews commented 4 years ago

R Internals says that Elements of character vectors (CHARSXPs) remain limited to 2^31 - 1 bytes.

Base R has:

> library(stringi); x<-stri_dup("a", 2**30); y <- paste(c(x, x), collapse="")
#Error in paste(c(x, x), collapse = "") : result would exceed 2^31-1 bytes