findText: findText

View source: R/archive/findText.R View source: R/findText.R

findTextR Documentation

findText

Description

Extract all texts, getMsg, or setMsg calls in the R files given. Note that the ⁠'⁠ and ⁠"⁠ are part of the string, thus 'ROUND' has a length of 7!

Usage

findText(files, pattern = "\\w+{2,}")

Arguments

files

character: names of R files to analyse

pattern

character: pattern to match a string (default: "\\w+{2,}")

Value

a data frame with the columns

  • file with file name

  • line the line number

  • type if a string constant (STR_CONST), a getMsg (GETMSG), or a setMsg (SETMSG) was found

  • text the text of the string constant or the key used in getMsg or setMsg

Examples

findText(system.file("messages", "messages.R", package="stranslate"))

stranslate documentation built on May 29, 2024, 10:57 a.m.