split is in bulitins
This commit is contained in:
parent
ca97783f0d
commit
d150487ede
|
@ -5,7 +5,7 @@
|
||||||
with lib;
|
with lib;
|
||||||
let
|
let
|
||||||
removeBlankLines = str:
|
removeBlankLines = str:
|
||||||
concatStringsSep "\n\n" (filter isString (split ''
|
concatStringsSep "\n\n" (filter isString (builtins.split ''
|
||||||
|
|
||||||
|
|
||||||
+'' str));
|
+'' str));
|
||||||
|
@ -28,7 +28,7 @@ let
|
||||||
let
|
let
|
||||||
lines = splitString "\n" zonedata;
|
lines = splitString "\n" zonedata;
|
||||||
records = filter isRecord lines;
|
records = filter isRecord lines;
|
||||||
split-records = map recordMatcher records;
|
splitRecords = map recordMatcher records;
|
||||||
indexStrlen = i: record: stringLength (elemAt record i);
|
indexStrlen = i: record: stringLength (elemAt record i);
|
||||||
recordIndexMaxlen = i: maxInt (map (indexStrlen i) splitRecords);
|
recordIndexMaxlen = i: maxInt (map (indexStrlen i) splitRecords);
|
||||||
in recordFormatter (recordIndexMaxlen 0) (recordIndexMaxlen 1);
|
in recordFormatter (recordIndexMaxlen 0) (recordIndexMaxlen 1);
|
||||||
|
|
Loading…
Reference in New Issue