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

Description Usage Examples

View source: R/stringtools.R

Description

Returns the substring left to the first occurence of pattern

Usage

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

Examples

1
2
3
4
5
6
7
8
## 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 26, 2017, 12:16 p.m.