Run-length encoding: Difference between revisions

m
Line 700:
 
public static string Decode(string input) => input
.Scan((val: '\0', key: 0, next:0), (scn, chr) => (val: chr, key: scn.next, next: !char.IsDigit(chr) ? scn.next +1 : scn.next))
(val: chr, key: scn.next, next: !char.IsDigit(chr) ? scn.next +1 : scn.next))
.Skip(1)
.GroupBy(t => t.key, (_, grp) => grp.Select(c => c.val))