Learn R Programming

Xmisc (version 0.2.1)

startswith: Determine if a character string "starts with" specified characters

Description

Determine if a character string "starts with" specified characters. A modified version of gdata::startsWith.

Usage

startswith(x, char, ignore.case = FALSE)

Arguments

x
character, a string.
char
character to match.
ignore.case
logical, whether case is ignored

Value

logical

Examples

Run this code
startswith('Hello World','hello',ignore.case=TRUE)

Run the code above in your browser using DataLab