Added count_chosen function;

Added I_DUP instruction

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1007 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
twanvl
2008-06-28 14:41:38 +00:00
parent fe2e3fb9c8
commit dfae1b2729
11 changed files with 135 additions and 49 deletions
+24
View File
@@ -0,0 +1,24 @@
Function: count_chosen
DOC_MSE_VERSION: since 0.3.7
--Usage--
> count_chosen(choices: some_string, some_multiple_choice_value)
Coint the number of choices that are selected in a [[type:value#multiple_choice|multiple choice value]].
If the @choices@ parameter is given then only choices from that list are counted.
--Parameters--
! Parameter Type Description
| @input@ [[type:string]] Multiple choice value to look in.
| @choices@ optional [[type:string]] A comma separated list of choices to look for.
--Examples--
> count_chosen("") == 0
> count_chosen("red") == 1
> count_chosen("red, green") == 2
> count_chosen("red, green", choices: "red,blue") == 1
--See also--
| [[fun:chosen]] Is a given choice selected in a multiple choice value?