Does std provide something similar to std::partition()?

Does the zig standard lib provide a function that works like c++ std::partition() or do I have to implement it myself? I couldn’t find anything with that exact name.

This is what I’m using now:

const std = @import("std");

pub fn partition(comptime T: type, data: []T, p: anytype) usize {
    var first: usize = data.len;
    for (data) |d, i| {
        if (!p.f(d)) {
            first = i;
            break;
        }
    }

    if (first == data.len) {
        return first;
    }

    var i = first + 1;
    while (i < data.len) : (i += 1) {
        if (p.f(data[i])) {
            std.mem.swap(T, &data[i], &data[first]);
            first += 1;
        }
    }

    return first;
}

It is probably more idiomatic to pass a context and a function pointer, right? But it was easier to assume a struct with f() in my case.