Skip to content

Commit 6bedb42

Browse files
committed
add ignore_case option to coll of locate
1 parent cf1f645 commit 6bedb42

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

R/locate.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@ str_locate_single <- function(l, x) {
33
return(NULL)
44
}
55

6-
if (class(x) == "fixed" || class(x) == "regex" || class(x) == "coll" && x@ignore_case) {
6+
if (class(x) == "fixed" || class(x) == "regex" && x@ignore_case) {
77
l <- convert_to_uppercase(l)
88
}
99

1010
switch(
1111
class(x),
1212
fixed = str_bytes_locate(l, get_fixed(x)),
1313
regex = str_regex_locate(l, get_regex(x)),
14-
coll = str_utf8_locate(l, get_coll(x)),
14+
coll = str_utf8_locate(l, get_coll(x), x@ignore_case),
1515
character = str_regex_locate(l, x)
1616
)
1717
}

0 commit comments

Comments
 (0)