Functions.Instr(Column, String) Method

Definition

Locate the position of the first occurrence of the given substring.

public static Microsoft.Spark.Sql.Column Instr (Microsoft.Spark.Sql.Column column, string substring);
static member Instr : Microsoft.Spark.Sql.Column * string -> Microsoft.Spark.Sql.Column
Public Shared Function Instr (column As Column, substring As String) As Column

Parameters

column
Column

Column to apply

substring
String

Substring to find

Returns

Column object

Remarks

The position is not zero based, but 1 based index. Returns 0 if the given substring could not be found.

Applies to