mirror of
https://github.com/openbullet/openbullet.git
synced 2023-10-21 07:33:42 -05:00
Added the Length function to the List group in Utility block.
This commit is contained in:
@@ -46,6 +46,9 @@ namespace RuriLib
|
|||||||
/// <summary>Creates an empty list variable.</summary>
|
/// <summary>Creates an empty list variable.</summary>
|
||||||
Create,
|
Create,
|
||||||
|
|
||||||
|
/// <summary>Calculates the length of a list.</summary>
|
||||||
|
Length,
|
||||||
|
|
||||||
/// <summary>Joins a list into a single string, separating the elements with a separator.</summary>
|
/// <summary>Joins a list into a single string, separating the elements with a separator.</summary>
|
||||||
Join,
|
Join,
|
||||||
|
|
||||||
@@ -409,6 +412,10 @@ namespace RuriLib
|
|||||||
data.Variables.Set(new CVar(variableName, new List<string>(), isCapture));
|
data.Variables.Set(new CVar(variableName, new List<string>(), isCapture));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case ListAction.Length:
|
||||||
|
data.Variables.Set(new CVar(variableName, list.Count().ToString(), isCapture));
|
||||||
|
break;
|
||||||
|
|
||||||
case ListAction.Join:
|
case ListAction.Join:
|
||||||
data.Variables.Set(new CVar(variableName, string.Join(separator, list), isCapture));
|
data.Variables.Set(new CVar(variableName, string.Join(separator, list), isCapture));
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user