tests/testthat/test-lstrip.R

test_that("strs_lstrip works for chars = NULL", {
  expect_equal(strs_lstrip("     test     "), "test     ")
  expect_equal(strs_lstrip("test     "), "test     ")
  expect_equal(strs_lstrip("     test"), "test")

  expect_equal(strs_lstrip("rmftestrmf", c("r", "m", "f")), "testrmf")
  expect_equal(strs_lstrip("rmftestrmf", "rmf"), "testrmf")
})

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.