str.left.of: Returns the substring left to the first occurence of pattern

View source: R/stringtools.R

str.left.ofR Documentation

Returns the substring left to the first occurence of pattern

Description

Returns the substring left to the first occurence of pattern

Usage

## S3 method for class 'left.of'
str(str, pattern, ..., not.found = str)

Examples

## Not run: 
  str = c("a = 5","b+3","a+3 = 4 = 3", "=")
  str.left.of(str,"=")
  str.left.of(str,"=", not.found=NA)
  str.right.of(str,"=")
  str.right.of(str,"=", not.found=NA)  

## End(Not run)

skranz/stringtools documentation built on May 11, 2022, 4:48 a.m.