File: capitalize.s

package info (click to toggle)
hmisc 3.14-5-1
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 2,792 kB
  • ctags: 701
  • sloc: asm: 23,440; fortran: 600; ansic: 375; xml: 160; makefile: 1
file content (7 lines) | stat: -rw-r--r-- 173 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
capitalize <- function(string) {
  capped <- grep('^[^A-Z]*$', string, perl=TRUE)

  substr(string[capped], 1,1) <- toupper(substr(string[capped], 1,1))
  return(string)
}