Mercurial > repos > tabletprog
comparison modules/array.tp @ 186:35d2cc193d99
Add string conversion inside array join so callers don't need to worry about doing string conversions themselves
author | Mike Pavone <pavone@retrodev.com> |
---|---|
date | Mon, 26 Aug 2013 17:27:17 -0700 |
parents | ca249978ae96 |
children | abde5d2918cf |
comparison
equal
deleted
inserted
replaced
185:181d8754a2ae | 186:35d2cc193d99 |
---|---|
103 ret | 103 ret |
104 } | 104 } |
105 | 105 |
106 join <- :sep { | 106 join <- :sep { |
107 if: length > 0 { | 107 if: length > 0 { |
108 str <- get: 0 | 108 str <- string: (get: 0) |
109 idx <- 1 | 109 idx <- 1 |
110 l <- length | 110 l <- length |
111 while: { idx < l } do: { | 111 while: { idx < l } do: { |
112 str <- str . sep . (get: idx) | 112 str <- str . sep . (get: idx) |
113 } | 113 } |