Skyler Grey | 82ea805 | 2024-06-08 22:56:00 +0000 | [diff] [blame^] | 1 | # SPDX-FileCopyrightText: 2024 Clicks Codes |
2 | # | ||||
3 | # SPDX-License-Identifier: GPL-3.0-only | ||||
4 | |||||
5 | { lib, inputs, ... }: | ||||
6 | { | ||||
7 | strings = { | ||||
8 | getCommonPrefix = | ||||
9 | a: b: | ||||
10 | let | ||||
11 | prefixLength = lib.strings.commonPrefixLength a b; | ||||
12 | in | ||||
13 | builtins.substring 0 prefixLength a; | ||||
14 | }; | ||||
15 | } |