con <- rawConnection(c(charToRaw("hello12.3"), as.raw(0)))
read_str(con)
close(con)
con <- rawConnection(charToRaw("hello12.3"))
read_str_raw(con, 5)
close(con)
con <- rawConnection(c(charToRaw("hello12.3"), as.raw(0)))
read_utf8(con)
close(con)
con <- rawConnection(charToRaw("hello12.3"))
read_utf8_raw(con, 3)
close(con)
Run the code above in your browser using DataLab