Share via


Functions.Locate Method

Definition

Overloads

Locate(String, Column)

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

Locate(String, Column, Int32)

Locate the position of the first occurrence of the given substring starting from the given position offset.

Locate(String, Column)

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

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

Parameters

substring
String

Substring to find

column
Column

Column to apply

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

Locate(String, Column, Int32)

Locate the position of the first occurrence of the given substring starting from the given position offset.

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

Parameters

substring
String

Substring to find

column
Column

Column to apply

pos
Int32

Offset to start the search

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