pub fn wtf8ToUtf8LossyAlloc(allocator: Allocator, wtf8: []const u8) error allocator: Allocatorwtf8: []const u81894
1895
1896
1897
1898
1899
1900
1901pub fn wtf8ToUtf8LossyAlloc(allocator: Allocator, wtf8: []const u8) error{ InvalidWtf8, OutOfMemory }![]u8 {
const utf8 = try allocator.alloc(u8, wtf8.len);
errdefer allocator.free(utf8);
try wtf8ToUtf8Lossy(utf8, wtf8);
return utf8;
}