tests/testthat/test-removesuffix.R

test_that("strs_removesuffix works", {
  expect_equal(strs_removesuffix("words", "rds"), "wo")
  expect_equal(strs_removesuffix("words", "wo"), "words")
  expect_equal(strs_removesuffix(rep("words", 2), "rds"), rep("wo", 2))
})

Try the strs package in your browser

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

strs documentation built on Sept. 11, 2024, 6:44 p.m.