powered by
Locate the position of the first occurrence of substr column in the given string. Returns null if either of the arguments are null.
instr(y, x)# S4 method for Column,character instr(y, x)
# S4 method for Column,character instr(y, x)
column to check
substring to check
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, length, levenshtein, locate, 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
length
levenshtein
locate
lower
lpad
ltrim
regexp_extract
regexp_replace
reverse
rpad
rtrim
soundex
substring_index
translate
trim
unbase64
upper
# NOT RUN { instr(df$c, 'b') # }
Run the code above in your browser using DataLab