tests/testthat/test-strip.R

test_that("strs_strip works for chars = NULL", {
  expect_equal(strs_strip("     test     "), "test")
  expect_equal(strs_strip("test     "), "test")
  expect_equal(strs_strip("     test"), "test")
  expect_equal(strs_strip("rmftest", c("r", "m", "f")), "test")
  expect_equal(strs_strip("rmftest", "rmf"), "test")
})

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.