R: How to ignore case when using str_detect?

后端 未结 4 1417
深忆病人
深忆病人 2020-12-14 16:22

stringr package provides good string functions.

To search for a string (ignoring case)

one could use

stringr::str_detect(\'TOYOTA subaru\',ig         


        
4条回答
  •  死守一世寂寞
    2020-12-14 16:46

    the search string must be inside function fixed and that function has valid parameter ignore_case

    str_detect('TOYOTA subaru', fixed('toyota', ignore_case=TRUE))
    

提交回复
热议问题