str.remove.ends: remove charcaters on left and right of a string...

View source: R/stringtools.R

str.remove.endsR Documentation

remove charcaters on left and right of a string str.remove.ends(c("ABCDEF","01"),1,3) returns c("BC","")

Description

remove charcaters on left and right of a string str.remove.ends(c("ABCDEF","01"),1,3) returns c("BC","")

Usage

## S3 method for class 'remove.ends'
str(str, left = 0, right = 0)

Examples

## Not run: 
  str.remove.ends(c("ABCDEF","01345"),1,3)
  str.remove.ends(c("ABCDEF"),1:2,1:2)  
  str.remove.ends(c("ABCDEF","01345"),1:2,1)
  # The following calls throw errors!
  str.remove.ends(c("ABCDEF","01345"),1:2,1:3)  
  str.remove.ends(c("ABCDEF","01345","NOW!"),1:2,1)

## End(Not run)

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