SqlFunctions.Stuff Method

Definition

Inserts a string into another string. It deletes a specified length of characters in the target string at the start position and then inserts the second string into the target string at the start position.

public:
 static System::String ^ Stuff(System::String ^ stringInput, Nullable<int> start, Nullable<int> length, System::String ^ stringReplacement);
[System.Data.Objects.DataClasses.EdmFunction("SqlServer", "STUFF")]
public static string Stuff (string stringInput, int? start, int? length, string stringReplacement);
[<System.Data.Objects.DataClasses.EdmFunction("SqlServer", "STUFF")>]
static member Stuff : string * Nullable<int> * Nullable<int> * string -> string
Public Shared Function Stuff (stringInput As String, start As Nullable(Of Integer), length As Nullable(Of Integer), stringReplacement As String) As String

Parameters

stringInput
String

The target string.

start
Nullable<Int32>

The character position in stringInput where the replacement string is to be inserted.

length
Nullable<Int32>

The number of characters to delete from stringInput. If length is longer than stringInput, deletion occurs up to the last character in stringReplacement.

stringReplacement
String

The substring to be inserted into stringInput.

Returns

A string consisting of the two strings.

Attributes

Remarks

You cannot call this function directly. This function can only appear within a LINQ to Entities query.

This function is translated to a corresponding function in the database. For information about the corresponding SQL Server function, see STUFF (Transact-SQL).

Applies to