StringExtensions.GetStringBetween Method


StringExtensionsGetStringBetween Method
The method returns a substring between two strings

Namespace: Telerik.ILS.Common
Assembly: StringExtensions (in StringExtensions.dll) Version: (
public static string GetStringBetween(
	this string input,
	string startString,
	string endString,
	int startFrom = 0
Public Shared Function GetStringBetween ( 
	input As String,
	startString As String,
	endString As String,
	Optional startFrom As Integer = 0
) As String
static String^ GetStringBetween(
	String^ input, 
	String^ startString, 
	String^ endString, 
	int startFrom = 0
static member GetStringBetween : 
        input : string * 
        startString : string * 
        endString : string * 
        ?startFrom : int 
(* Defaults:
        let _startFrom = defaultArg startFrom 0
-> string 


Type: SystemString

[Missing <param name="input"/> documentation for "M:Telerik.ILS.Common.StringExtensions.GetStringBetween(System.String,System.String,System.String,System.Int32)"]

Type: SystemString
Starting point of the substring
Type: SystemString
Ending point of the substring
startFrom (Optional)
Type: SystemInt32

[Missing <param name="startFrom"/> documentation for "M:Telerik.ILS.Common.StringExtensions.GetStringBetween(System.String,System.String,System.String,System.Int32)"]

Return Value

Type: String
Returns the string between startString and endString. If the arguments are not contained in the initial string, the method returns an empty string.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type String. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also