Nick Khyl
d500a92926
util/slicesx: add HasPrefix, HasSuffix, CutPrefix, and CutSuffix functions
...
The standard library includes these for strings and byte slices,
but it lacks similar functions for generic slices of comparable types.
Although they are not as commonly used, these functions are useful
in scenarios such as working with field index sequences (i.e., []int)
via reflection.
Updates #12687
Signed-off-by: Nick Khyl <nickk@tailscale.com>
2024-07-22 11:03:46 -05:00
..
2024-02-27 23:03:49 -05:00
2023-01-27 15:36:29 -08:00
2023-04-05 17:21:16 -07:00
2024-06-05 15:24:04 -07:00
2024-03-05 16:57:04 +00:00
2024-07-19 12:50:39 -05:00
2024-04-16 15:32:38 -07:00
2024-02-08 17:34:22 -08:00
2024-06-19 12:25:53 -07:00
2023-03-04 12:24:55 -08:00
2024-04-16 15:32:38 -07:00
2024-01-18 12:08:13 -08:00
2024-04-16 15:32:38 -07:00
2024-04-16 15:32:38 -07:00
2023-06-23 12:50:45 -07:00
2023-11-01 19:23:16 -07:00
2024-04-16 15:32:38 -07:00
2023-10-13 15:38:22 -07:00
2023-11-22 12:09:59 -05:00
2024-04-16 15:32:38 -07:00
2024-07-10 09:57:00 -07:00
2023-01-27 15:36:29 -08:00
2024-07-10 09:57:00 -07:00
2024-05-17 20:01:40 -04:00
2023-04-17 18:38:24 -04:00
2024-04-16 15:32:38 -07:00
2023-01-27 15:36:29 -08:00
2024-04-16 15:32:38 -07:00
2024-07-10 09:57:00 -07:00
2024-07-10 09:57:00 -07:00
2024-04-23 08:54:17 -05:00
2024-04-16 15:32:38 -07:00
2024-05-24 14:11:19 -04:00
2023-01-27 15:36:29 -08:00
2024-03-27 08:53:52 -05:00
2023-01-27 15:36:29 -08:00
2024-04-16 15:32:38 -07:00
2023-01-27 15:36:29 -08:00
2024-06-05 15:57:27 -07:00
2024-06-05 15:24:04 -07:00
2024-04-16 15:32:38 -07:00
2024-05-05 21:14:28 -07:00
2024-06-10 18:38:27 -04:00
2024-07-22 11:03:46 -05:00
2024-06-14 10:59:40 -07:00
2023-04-03 17:14:14 -04:00
2023-01-27 15:36:29 -08:00
2023-08-08 19:51:44 -06:00
2024-04-16 15:32:38 -07:00
2024-04-04 14:38:16 -07:00
2024-04-16 15:32:38 -07:00
2023-02-01 14:39:13 -08:00
2024-07-10 09:57:00 -07:00
2024-04-16 15:32:38 -07:00