powered by
Locate the position of the first occurrence of substr.
locate(substr, str, ...)# S4 method for character,Column locate(substr, str, pos = 1)
# S4 method for character,Column locate(substr, str, pos = 1)
a character string to be matched.
a Column where matches are sought for each entry.
further arguments to be passed to or from other methods.
start position of search.
Note: The position is not zero based, but 1 based index. Returns 0 if substr could not be found in str.
Other string_funcs: ascii, base64, concat_ws, concat, decode, encode, format_number, format_string, initcap, instr, length, levenshtein, lower, lpad, ltrim, regexp_extract, regexp_replace, reverse, rpad, rtrim, soundex, substring_index, translate, trim, unbase64, upper
ascii
base64
concat_ws
concat
decode
encode
format_number
format_string
initcap
instr
length
levenshtein
lower
lpad
ltrim
regexp_extract
regexp_replace
reverse
rpad
rtrim
soundex
substring_index
translate
trim
unbase64
upper
# NOT RUN { locate('b', df$c, 1) # }
Run the code above in your browser using DataLab