Closed MichaelChirico closed 3 years ago
inherits(r <- xfun::raw_string("abcd"), "character") # [1] FALSE identical(as.character(r), unclass(r)) # [1] TRUE
I'm not super familiar with all use cases, but it seems xfun_raw_string class is all about its print method. Is there a reason it wouldn't also inherit from character so it can be passed to character methods?
xfun_raw_string
print
character
I think it should. Please feel free to submit a PR. Thanks!
I'm not super familiar with all use cases, but it seems
xfun_raw_string
class is all about itsprint
method. Is there a reason it wouldn't also inherit fromcharacter
so it can be passed tocharacter
methods?