prependIndefArticle: Prepend an Indefinite Article to a String

View source: R/spelling.R

prependIndefArticleR Documentation

Prepend an Indefinite Article to a String

Description

This function prepends an indefinite article ("a" or "an") to a string based on whether it starts with a vowel or not.

Usage

prependIndefArticle(x)

pia(x)

Arguments

x

A character string.

Value

The string with an indefinite article prepended.

Examples

# Prepend an indefinite article to "apple"
prependIndefArticle("apple")
# Prepend an indefinite article to "banana"
prependIndefArticle("banana")

FastUtils documentation built on Sept. 11, 2024, 5:13 p.m.