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>
|
||||
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>
|
||||
Join,
|
||||
|
||||
@@ -409,6 +412,10 @@ namespace RuriLib
|
||||
data.Variables.Set(new CVar(variableName, new List<string>(), isCapture));
|
||||
break;
|
||||
|
||||
case ListAction.Length:
|
||||
data.Variables.Set(new CVar(variableName, list.Count().ToString(), isCapture));
|
||||
break;
|
||||
|
||||
case ListAction.Join:
|
||||
data.Variables.Set(new CVar(variableName, string.Join(separator, list), isCapture));
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user