Zig 0.17.0-dev (Split by item)

This is an example of documentation generated by ZigDoc, an alternative to Zig's built-in Auto Doc feature. See also examples in other modes/formats. The project being documented here (as the example) is the Zig library itself.

allocUpperString

Allocates an upper case copy of ascii_string. Caller owns returned string and must free with allocator.

ascii.allocUpperString
pub fn allocUpperString(allocator: std.mem.Allocator, ascii_string: []const u8) ![]u8

File

lib/std/ascii.zig:337

Code

pub fn allocUpperString(allocator: std.mem.Allocator, ascii_string: []const u8) ![]u8 {
    const result = try allocator.alloc(u8, ascii_string.len);
    return upperString(result, ascii_string);
}