# locate

open fun <T : String?> locate(queryBuilder: QueryBuilder, expr: Expression<T>, substring: String)

SQL function that returns the index of the first occurrence of the given substring substring in the string expression expr

#### Return

index of the first occurrence of substring in expr starting from 1 or 0 if expr doesn't contain substring

#### Parameters

queryBuilder

Query builder to append the SQL function to.

expr

String expression to find the substring in.

substring

: Substring to find