Assigns value to each element of input range range
Fills a range with a value from startIndex to endIndex
1 int[] a = [1, 2, 3]; 2 a.fill(5); 3 assert(a == [5, 5, 5]); 4 5 int[] b = [1, 2, 3, 4, 5]; 6 b.fill(9, 2, 4); 7 assert(b == [1, 2, 9, 9, 5]); 8 9 int[] c = [1, 2, 3, 4, 5]; 10 c.fill(9, 1, 100); 11 assert(c == [1, 9, 9, 9, 9]);
See Source File
Assigns value to each element of input range range