[R] discourage use of regex for fixed string comparisons (#8736)

This commit is contained in:
James Lamb
2023-01-30 04:47:21 -06:00
committed by GitHub
parent 1325ba9251
commit 0d8248ddcd
8 changed files with 20 additions and 19 deletions

View File

@@ -79,9 +79,9 @@ end_of_table <- empty_lines[empty_lines > start_index][1L]
# Read the contents of the table
exported_symbols <- objdump_results[(start_index + 1L):end_of_table]
exported_symbols <- gsub("\t", "", exported_symbols)
exported_symbols <- gsub("\t", "", exported_symbols, fixed = TRUE)
exported_symbols <- gsub(".*\\] ", "", exported_symbols)
exported_symbols <- gsub(" ", "", exported_symbols)
exported_symbols <- gsub(" ", "", exported_symbols, fixed = TRUE)
# Write R.def file
writeLines(