Three Different Cuts
https://matklad.github.io/2023/07/16/three-different-cuts.html
·
In this post, we'll look at how Rust, Go, and Zig express the signature of function cut --- the power tool of string manipulation.
Cut takes a string and a pattern, and splits the string around the first occurrence of the pattern:
cut("life", "if") = ("l", "e").