Skip to content

Commit

Permalink
slight doc fix for spelling.R
Browse files Browse the repository at this point in the history
  • Loading branch information
Qile0317 committed Jul 28, 2024
1 parent c914714 commit 2f1a9e1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
9 changes: 4 additions & 5 deletions R/spelling.R
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#' [isSnakeCase()].
#' @param uncase A logical indicating whether to remove all casing in the
#' output to lowercase.
#'
#'
#' @return A list of character vectors, each containing the parts of the string
#' split into individual words.
#' @export
Expand All @@ -31,7 +31,6 @@
#' trySplitWords("some|random|case")
#' trySplitWords("Space Words", "UPPER_CASE", uncase = TRUE)
#'

trySplitWords <- function(
..., conseq = TRUE, strictSnake = FALSE, uncase = TRUE
) {
Expand Down Expand Up @@ -170,8 +169,8 @@ isPascalCase <- function(x) {
#'
#' This function checks if a given string adheres to snake_case naming
#' conventions. By default (strict = TRUE), it only allows lowercase letters
#' separated by underscores. If strict is FALSE, uppercase letters are also
#' ermitted.
#' separated by underscores. If strict is FALSE, uppercase letters are also
#' permitted.
#'
#' @param x A character string to check.
#' @param strict Logical indicating whether the string should strictly contain
Expand Down Expand Up @@ -258,7 +257,7 @@ startsWithVowel <- function(x) {
#' prependIndefArticle("banana")
prependIndefArticle <- function(x) {
assertthat::assert_that(is.character(x))
paste("a", ifelse(startsWithVowel(x), "n", ""), " ", x, sep = "")
paste0("a", ifelse(startsWithVowel(x), "n", ""), " ", x)
}

#' @rdname prependIndefArticle
Expand Down
2 changes: 1 addition & 1 deletion man/isSnakeCase.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 2f1a9e1

Please sign in to comment.