first_word: Extract the first word in a character string

View source: R/string.R

first_wordR Documentation

Extract the first word in a character string

Description

Extract the first word in a character string.

Usage

first_word(string, compound_word = TRUE)

Arguments

string

A character vector.

compound_word

If TRUE, also captures hyphenated compound word.

Value

A character vector.

Examples

first_word("1. Le Corbeau et le Renard")

arnaudgallou/toolkit documentation built on Nov. 25, 2022, 5:42 p.m.