line-index-map ( line -- map )


Vocabulary
core-text

Inputs
linean object


Outputs
mapan object


Definition


:: line-index-map ( line -- map )
line index-map>>
[ ] [
line line-string :> string string aux>> [
[
string
[| ch i | ch 65535 > [ i , ] when ] each-index
] { } make
] [ { } ] if :> positions positions dup [ + ] map-index
2array dup line index-map<<
] if* ;