Click or drag to resize
StringXRange Method
Gets a slice of the supplied String using the specified start index, end index, and skip. Mimics slicing operator in Python.

Namespace: Candlelight
Assembly: Assembly-CSharp-firstpass (in Assembly-CSharp-firstpass.dll) Version: 0.0.0.0
Syntax
C#
public static string Range(
	this string str,
	int start,
	int end = -1,
	int skip = 1
)

Parameters

str
Type: SystemString
String to slice.
start
Type: SystemInt32
Start index.
end (Optional)
Type: SystemInt32
End index.
skip (Optional)
Type: SystemInt32
Number of indices to skip with each step.

Return Value

Type: String
A slice of the supplied 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