tests/testthat/test-str_right.R

test_that("str_left() returns a substring from the end of a specified string", {
  expect_identical(str_right("COVID-19", n = 2), "19")
  expect_equal(str_right("a,b,c"), "c")
})

Try the forstringr package in your browser

Any scripts or data that you put into this service are public.

forstringr documentation built on Aug. 7, 2023, 5:08 p.m.