sentence: Keep the first sentence of a string.

View source: R/console_output.R

sentenceR Documentation

Keep the first sentence of a string.

Description

Keep the first sentence of a string.

Usage

sentence(string)

Arguments

string

(Character) A string.

Value

The string with only the first sentence.

Examples

## Not run: 
sentence("This is a sentence. And this is another sentence.")

#> [1] "This is a sentence."

sentence("This is just one sentence.")

#> [1] "This is just one sentence."

sentence("Is this a sentence? Or is this one. Maybe this one! What if there are lots of sentences?")

#> [1] "Is this a sentence?

## End(Not run)


DesiQuintans/librarian documentation built on Dec. 29, 2024, 10:59 p.m.