File: startsWith.R

package info (click to toggle)
gdata 3.0.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 964 kB
  • sloc: sh: 27; makefile: 15
file content (14 lines) | stat: -rw-r--r-- 247 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
startsWith <- function(x, prefix, trim=FALSE, ignore.case=FALSE)
{
  if(trim) x <- trim(x)

  if(ignore.case)
  {
    x <- toupper(x)
    prefix <- toupper(prefix)
  }

  base::startsWith(x, prefix)
}

starts_with <- function(...) startsWith(...)