This API is a bit too opinionated for the Zig standard library. Applications should contain this logic instead.