ianmcook commented on a change in pull request #9915: URL: https://github.com/apache/arrow/pull/9915#discussion_r608237301
########## File path: r/R/dplyr.R ########## @@ -438,6 +440,48 @@ build_function_list <- function(FUN) { ) } +arrow_r_string_match_function <- function(FUN) { + function(pattern, x, ignore.case = FALSE, fixed = FALSE) { + if (ignore.case) { + # see the comments in the definition of `arrow_r_string_replace_function` + # below for an explanation of how this handles `ignore.case` and `fixed` + if (fixed) { + pattern <- gsub("\\E", "\\e", pattern, fixed = TRUE) + pattern <- paste0("(?i)\\Q", pattern, "\\E") + } else { + pattern <- paste0("(?i)", pattern) + } + } + FUN( + ifelse(fixed && !ignore.case, "match_substring", "match_substring_regex"), + x, + options = list(pattern = pattern) + ) + } +} + +arrow_stringr_string_match_function <- function(FUN) { + function(string, pattern, negate = FALSE) { + browser() Review comment: Hah, yeah very much still `[WIP]` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org