lib: simplify stringToCharacters
This commit is contained in:
@@ -18,6 +18,7 @@ rec {
|
|||||||
elemAt
|
elemAt
|
||||||
filter
|
filter
|
||||||
fromJSON
|
fromJSON
|
||||||
|
genList
|
||||||
head
|
head
|
||||||
isInt
|
isInt
|
||||||
isList
|
isList
|
||||||
@@ -346,7 +347,7 @@ rec {
|
|||||||
=> [ "<EFBFBD>" "<EFBFBD>" "<EFBFBD>" "<EFBFBD>" ]
|
=> [ "<EFBFBD>" "<EFBFBD>" "<EFBFBD>" "<EFBFBD>" ]
|
||||||
*/
|
*/
|
||||||
stringToCharacters = s:
|
stringToCharacters = s:
|
||||||
map (p: substring p 1 s) (lib.range 0 (stringLength s - 1));
|
genList (p: substring p 1 s) (stringLength s);
|
||||||
|
|
||||||
/* Manipulate a string character by character and replace them by
|
/* Manipulate a string character by character and replace them by
|
||||||
strings before concatenating the results.
|
strings before concatenating the results.
|
||||||
|
|||||||
Reference in New Issue
Block a user