diff options
author | figsoda <figsoda@pm.me> | 2023-06-22 18:27:15 -0400 |
---|---|---|
committer | figsoda <figsoda@pm.me> | 2023-06-22 18:27:15 -0400 |
commit | 57ca44c0aea940569d367af13894a0cb0975c502 (patch) | |
tree | e200f32b9a86daf97b1a461bb1f6d2e724311435 /lib | |
parent | a0782587aaf74095b53ae4c5dd8f6e6738b9bc6a (diff) |
lib: simplify stringToCharacters
Diffstat (limited to 'lib')
-rw-r--r-- | lib/strings.nix | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/strings.nix b/lib/strings.nix index bb07f40d7a559..1eb6cf9c1afbe 100644 --- a/lib/strings.nix +++ b/lib/strings.nix @@ -18,6 +18,7 @@ rec { elemAt filter fromJSON + genList head isInt isList @@ -346,7 +347,7 @@ rec { => [ "�" "�" "�" "�" ] */ 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 strings before concatenating the results. |