From 88556368176a2d4e0b31173015a6a8d168afc6b1 Mon Sep 17 00:00:00 2001 From: Madeorsk Date: Wed, 8 Jan 2025 22:28:17 +0100 Subject: [PATCH] Remove const qualifier in result strings. --- src/lib.zig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib.zig b/src/lib.zig index bc5b985..a4d4b81 100644 --- a/src/lib.zig +++ b/src/lib.zig @@ -5,7 +5,7 @@ const c = @cImport({ }); /// Convert a unicode codepoint to its ascii equivalent. -pub fn anyascii(allocator: std.mem.Allocator, codepoint: u21) ![]const u8 { +pub fn anyascii(allocator: std.mem.Allocator, codepoint: u21) ![]u8 { // Call C anyascii function. var cChars: [*]u8 = undefined; const charsCount = c.anyascii(codepoint, @ptrCast(&cChars)); @@ -31,7 +31,7 @@ pub fn anyasciiWrite(writer: std.io.AnyWriter, codepoint: u21) !void { } /// Convert a given UTF-8 string to its ASCII equivalent using anyascii. -pub fn utf8ToAscii(allocator: std.mem.Allocator, str: []const u8) ![]const u8 { +pub fn utf8ToAscii(allocator: std.mem.Allocator, str: []const u8) ![]u8 { // Get a UTF8 iterator. var iterator = (try std.unicode.Utf8View.init(str)).iterator();