StringExtensions.GetStringBetween Method

Telerik.ILS.Common

StringExtensionsGetStringBetween Method
The method returns a substring between two strings

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

Parameters

input
Type: SystemString

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

startString
Type: SystemString
Starting point of the substring
endString
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