sentence: Keep the first sentence of a string.

Description Usage Arguments Value Examples

View source: R/console_output.R

Description

Keep the first sentence of a string.

Usage

1
sentence(string)

Arguments

string

(Character) A string.

Value

The string with only the first sentence.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
## 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)

librarian documentation built on July 12, 2021, 5:07 p.m.