x <- str_locate_first("12345$9.50 for Math and $11.90 for both subjects", pattern = '\\$')
test_that("str_locate_first() returns integer vector", {
expect_equal(class(x), "integer")
})
test_that("str_locate_first() returns correct values", {
expect_equal(x, c(6, 25))
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.