SqlFunctions.CharIndex Method

 

Searches an expression for another expression and returns its starting position if found.

Namespace:   System.Data.Entity.SqlServer
Assembly:  EntityFramework.SqlServer (in EntityFramework.SqlServer.dll)

NameDescription
System_CAPS_pubmethodSystem_CAPS_staticCharIndex(Byte[], Byte[])

Returns the starting position of one expression found within another expression.

System_CAPS_pubmethodSystem_CAPS_staticCharIndex(Byte[], Byte[], Nullable<Int32>)

Returns the starting position of one expression found within another expression.

System_CAPS_pubmethodSystem_CAPS_staticCharIndex(Byte[], Byte[], Nullable<Int64>)

Returns the starting position of one expression found within another expression.

System_CAPS_pubmethodSystem_CAPS_staticCharIndex(String, String)

Returns the starting position of one expression found within another expression.

System_CAPS_pubmethodSystem_CAPS_staticCharIndex(String, String, Nullable<Int32>)

Returns the starting position of one expression found within another expression.

System_CAPS_pubmethodSystem_CAPS_staticCharIndex(String, String, Nullable<Int64>)

Returns the starting position of one expression found within another expression.


SqlFunctions.CharIndex Method (Byte[], Byte[])

Returns the starting position of one expression found within another expression.

[DbFunctionAttribute("SqlServer", "CHARINDEX")]
[SuppressMessageAttribute("Microsoft.Usage", "CA1801:ReviewUnusedParameters", 
	MessageId = "toSearch")]
[SuppressMessageAttribute("Microsoft.Usage", "CA1801:ReviewUnusedParameters", 
	MessageId = "target")]
public static Nullable<int> CharIndex(
	byte[] toSearch,
	byte[] target
)

Parameters

toSearch
Type: System.Byte[]

The string expression to be searched.

target
Type: System.Byte[]

The string expression to be found.

Return Value

Type: System.Nullable<Int32>

The starting position of target if it is found in toSearch .


SqlFunctions.CharIndex Method (Byte[], Byte[], Nullable<Int32>)

Returns the starting position of one expression found within another expression.

[SuppressMessageAttribute("Microsoft.Usage", "CA1801:ReviewUnusedParameters", 
	MessageId = "target")]
[DbFunctionAttribute("SqlServer", "CHARINDEX")]
[SuppressMessageAttribute("Microsoft.Usage", "CA1801:ReviewUnusedParameters", 
	MessageId = "toSearch")]
[SuppressMessageAttribute("Microsoft.Usage", "CA1801:ReviewUnusedParameters", 
	MessageId = "startLocation")]
public static Nullable<int> CharIndex(
	byte[] toSearch,
	byte[] target,
	Nullable<int> startLocation
)

Parameters

toSearch
Type: System.Byte[]

The string expression to be searched.

target
Type: System.Byte[]

The string expression to be found.

startLocation
Type: System.Nullable<Int32>

The character position in toSearch where searching begins.

Return Value

Type: System.Nullable<Int32>

The starting position of target if it is found in toSearch .


SqlFunctions.CharIndex Method (Byte[], Byte[], Nullable<Int64>)

Returns the starting position of one expression found within another expression.

[DbFunctionAttribute("SqlServer", "CHARINDEX")]
[SuppressMessageAttribute("Microsoft.Usage", "CA1801:ReviewUnusedParameters", 
	MessageId = "target")]
[SuppressMessageAttribute("Microsoft.Usage", "CA1801:ReviewUnusedParameters", 
	MessageId = "startLocation")]
[SuppressMessageAttribute("Microsoft.Usage", "CA1801:ReviewUnusedParameters", 
	MessageId = "toSearch")]
public static Nullable<long> CharIndex(
	byte[] toSearch,
	byte[] target,
	Nullable<long> startLocation
)

Parameters

toSearch
Type: System.Byte[]

The string expression to be searched.

target
Type: System.Byte[]

The string expression to be found.

startLocation
Type: System.Nullable<Int64>

The character position in toSearch at which searching begins.

Return Value

Type: System.Nullable<Int64>

The starting position of target if it is found in toSearch .


SqlFunctions.CharIndex Method (String, String)

Returns the starting position of one expression found within another expression.

[SuppressMessageAttribute("Microsoft.Usage", "CA1801:ReviewUnusedParameters", 
	MessageId = "target")]
[SuppressMessageAttribute("Microsoft.Usage", "CA1801:ReviewUnusedParameters", 
	MessageId = "toSearch")]
[DbFunctionAttribute("SqlServer", "CHARINDEX")]
public static Nullable<int> CharIndex(
	string toSearch,
	string target
)

Parameters

toSearch
Type: System.String

The string expression to be searched.

target
Type: System.String

The string expression to be found.

Return Value

Type: System.Nullable<Int32>

The starting position of target if it is found in toSearch .


SqlFunctions.CharIndex Method (String, String, Nullable<Int32>)

Returns the starting position of one expression found within another expression.

[SuppressMessageAttribute("Microsoft.Usage", "CA1801:ReviewUnusedParameters", 
	MessageId = "target")]
[SuppressMessageAttribute("Microsoft.Usage", "CA1801:ReviewUnusedParameters", 
	MessageId = "toSearch")]
[SuppressMessageAttribute("Microsoft.Usage", "CA1801:ReviewUnusedParameters", 
	MessageId = "startLocation")]
[DbFunctionAttribute("SqlServer", "CHARINDEX")]
public static Nullable<int> CharIndex(
	string toSearch,
	string target,
	Nullable<int> startLocation
)

Parameters

toSearch
Type: System.String

The string expression to be searched.

target
Type: System.String

The string expression to be found.

startLocation
Type: System.Nullable<Int32>

The character position in toSearch where searching begins.

Return Value

Type: System.Nullable<Int32>

The starting position of target if it is found in toSearch .


SqlFunctions.CharIndex Method (String, String, Nullable<Int64>)

Returns the starting position of one expression found within another expression.

[SuppressMessageAttribute("Microsoft.Usage", "CA1801:ReviewUnusedParameters", 
	MessageId = "startLocation")]
[SuppressMessageAttribute("Microsoft.Usage", "CA1801:ReviewUnusedParameters", 
	MessageId = "toSearch")]
[SuppressMessageAttribute("Microsoft.Usage", "CA1801:ReviewUnusedParameters", 
	MessageId = "target")]
[DbFunctionAttribute("SqlServer", "CHARINDEX")]
public static Nullable<long> CharIndex(
	string toSearch,
	string target,
	Nullable<long> startLocation
)

Parameters

toSearch
Type: System.String

The string expression to be searched.

target
Type: System.String

The string expression to be found.

startLocation
Type: System.Nullable<Int64>

The character position in toSearch where searching begins.

Return Value

Type: System.Nullable<Int64>

A Nullable<T> of Int64 value that is the starting position of target if it is found in toSearch .