locate {SparkR}R Documentation

locate

Description

Locate the position of the first occurrence of substr. NOTE: The position is not zero based, but 1 based index, returns 0 if substr could not be found in str.

Usage

locate(substr, str, ...)

## S4 method for signature 'character,Column'
locate(substr, str, pos = 0)

See Also

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

Examples

## Not run: locate('b', df$c, 1)

[Package SparkR version 2.0.0 Index]