Table of Contents

Class IndexOf

Namespace
YndigoBlue.Velocity.Functions
Assembly
YndigoBlue.Velocity.dll

Represents the CHARINDEX/INSTR function that finds the position of a substring within a string.

public class IndexOf : Function, IElement, ICheckItem, IDefaultItem, IFilterItem
Inheritance
IndexOf
Implements

Remarks

The CHARINDEX (SQL Server) or INSTR (Oracle) function returns the starting position of a substring within a string. Returns 0 if the substring is not found. Position indexing is typically 1-based. This function is useful for parsing, validation, and conditional logic based on string content.

Constructors

IndexOf(IElement, IElement)

Initializes a new instance of IndexOf with generic elements.

IndexOf(Column, string)

Initializes a new instance of IndexOf with a literal substring.

IndexOf(Column, Column)

Initializes a new instance of IndexOf with a column-based substring.

IndexOf(Expression, string)

Initializes a new instance of IndexOf for a string expression.