fix linux
* error.BadFd is not a valid error code. it would always be a bug to get this error code. * merge error.Io with existing error.InputOutput * merge error.PathNotFound with existing error.FileNotFound. Not all OS's support both. * add os.File.openReadC * add error.BadPathName for windows file operations with invalid characters * add os.toPosixPath to help stack allocate a null terminating byte * add some TODOs for other functions to investigate removing the allocator requirement * optimize some implementations to use the alternate functions when a null byte is already available * add a missing error.SkipZigTest * os.selfExePath uses a non-allocating API * os.selfExeDirPath uses a non-allocating API * os.path.real uses a non-allocating API * add os.path.realAlloc and os.path.realC * convert many windows syscalls to use the W versions (See #534)
This commit is contained in:
@@ -495,7 +495,7 @@ pub fn utf16leToUtf8Alloc(allocator: *mem.Allocator, utf16le: []const u16) ![]u8
|
||||
}
|
||||
|
||||
/// Asserts that the output buffer is big enough.
|
||||
/// Returns end index.
|
||||
/// Returns end byte index into utf8.
|
||||
pub fn utf16leToUtf8(utf8: []u8, utf16le: []const u16) !usize {
|
||||
var end_index: usize = 0;
|
||||
var it = Utf16LeIterator.init(utf16le);
|
||||
|
||||
Reference in New Issue
Block a user