add split-filename
This commit is contained in:
parent
5b510c550d
commit
7a6b833148
7
split-filename.nix
Normal file
7
split-filename.nix
Normal file
|
@ -0,0 +1,7 @@
|
|||
with builtins;
|
||||
|
||||
f:
|
||||
let mr = match "(.*)[.]([^.]*)|(.*)" f;
|
||||
in if head mr == null
|
||||
then { name = (elemAt mr 2); extension = null; }
|
||||
else { name = (elemAt mr 0); extension = (elemAt mr 1); }
|
Loading…
Reference in New Issue
Block a user