====== BitMaskToIndex ====== ### //BitMaskToString(string)// takes a string and returns NF and an IndexList. NF is equal to the number of '0' and '1' characters in the string. IndexList is a table containing the positions of the '1's only counting '1's and '0's. ### ### See also [[documentation:language_reference:functions:indextobitmask|IndexToBitMask]] ### ===== Input ===== * string : A string ===== Output ===== * NF : Integer * IndexList : Table of Integers ===== Example ===== ==== Input ==== BitMask = "00000 10101 000" NF, Index = BitMaskToIndex(BitMask) print(NF) print(Index) ==== Result ==== 12 {5,7,9} ===== Table of contents ===== {{indexmenu>.#1}}