nealrichardson commented on PR #14647: URL: https://github.com/apache/arrow/pull/14647#issuecomment-1315747284
> We already do `substr()` (which maps to the `utf8_slice_codeunits()` function...this doesn't work on a string type). > Ah ok. Would it make sense to call `binary_slice` inside of `substr()` if the type of the input is `binary()`? Or maybe it's not worth bothering with. > Fun discovery in the process, though: > > ```r > substr(list(as.raw(1:5)), 1, 100) > #> [1] "as.raw(c(0x01, 0x02, 0x03, 0x04, 0x05))" > ``` Yeah that is truly odd. Without `list()` it is more sensible. ``` > as.character(list(as.raw(1:5))) [1] "as.raw(c(0x01, 0x02, 0x03, 0x04, 0x05))" > as.character(as.raw(1:5)) [1] "01" "02" "03" "04" "05" ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
