R/tryTolower.R

Defines functions tryTolower

Documented in tryTolower

tryTolower <-
function(testo, ifErrorReturnText=FALSE)
{
   # tryCatch error
   try_error = tryCatch(tolower(testo), error=function(e) e)
   # if not an error
   if (!inherits(try_error, "error"))
      testo = tolower(testo) else testo = NA
   testo
}
livioivil/TextWiller documentation built on Nov. 30, 2020, 3:17 a.m.