summaryrefslogtreecommitdiffhomepage
path: root/control/controlknobs
diff options
context:
space:
mode:
authorNick Khyl <nickk@tailscale.com>2024-07-22 10:36:10 -0500
committerNick Khyl <1761190+nickkhyl@users.noreply.github.com>2024-07-22 11:03:46 -0500
commitd500a92926a236705abf6a0aac1fe4e11f0b71d3 (patch)
treeb407d9471db46892e45e08bdc107a6de6f11aa59 /control/controlknobs
parent1f94047475e4cbc1ef859ef86c4870e9e3496373 (diff)
downloadtailscale-d500a92926a236705abf6a0aac1fe4e11f0b71d3.tar.xz
tailscale-d500a92926a236705abf6a0aac1fe4e11f0b71d3.zip
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>
Diffstat (limited to 'control/controlknobs')
0 files changed, 0 insertions, 0 deletions