Returns the substring from string str before count occurrences of the delimiter delim.
If count is positive, everything the left of the final delimiter (counting from left) is
returned. If count is negative, every to the right of the final delimiter (counting from the
right) is returned. substring_index performs a case-sensitive match when searching for delim.
Usage
substring_index(x, delim, count)
# S4 method for Column,character,numeric
substring_index(x, delim, count)
Arguments
x
a Column.
delim
a delimiter string.
count
number of occurrences of delim before the substring is returned.
A positive number means counting from the left, while negative means
counting from the right.