Click or drag to resize

imbStringCommonToolsrangeStringToIndexList Method

imbSCI | imbACE | imbNLP | imbWEM | imbWBI
Compiles range expression into list of integers. Range expression format e.g.: 3-5,8 , 2-8, 9, *

Namespace:  imbSCI.Core.extensions.text
Assembly:  imbSCI.Core (in imbSCI.Core.dll) Version: 0.3.58.
Syntax
C#
public static List<int> rangeStringToIndexList(
	this string rangeLine,
	int indMax = 100
)
Request Example View Source

Parameters

rangeLine
Type: SystemString
Range expression like: > 1=5, 8, 12-20, 3
indMax (Optional)
Type: SystemInt32
The end of range

Return Value

Type: ListInt32
List with index numbers / positional integers

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).
Exceptions
ExceptionCondition
ArgumentExceptionrangeLine - Expression range processing error
Remarks
For unlimited range on one side higher/lower symbols, e.g.: 3 > means: from 3 to the end
See Also