about summary refs log tree commit diff
path: root/users/sterni/nix/string/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'users/sterni/nix/string/default.nix')
-rw-r--r--users/sterni/nix/string/default.nix4
1 files changed, 4 insertions, 0 deletions
diff --git a/users/sterni/nix/string/default.nix b/users/sterni/nix/string/default.nix
index 782f86b7f79b..e2b27571c73f 100644
--- a/users/sterni/nix/string/default.nix
+++ b/users/sterni/nix/string/default.nix
@@ -55,6 +55,9 @@ let
       then s
       else pad { inherit char; "${side}" = diff; } s;
 
+  # pattern matching for strings only
+  match = val: matcher: matcher."${val}";
+
 in {
   inherit
     take
@@ -67,5 +70,6 @@ in {
     fromChars
     pad
     fit
+    match
     ;
 }