mirror of
https://github.com/oven-sh/bun
synced 2026-02-10 02:48:50 +00:00
no usingnamespace, organize jsc namespace, enable -fincremental (#19122)
Co-authored-by: Dylan Conway <35280289+dylan-conway@users.noreply.github.com>
This commit is contained in:
@@ -205,7 +205,7 @@ pub const WTFStringImplStruct = extern struct {
|
||||
pub fn utf8ByteLength(this: WTFStringImpl) usize {
|
||||
if (this.is8Bit()) {
|
||||
const input = this.latin1Slice();
|
||||
return if (input.len > 0) JSC.WebCore.Encoder.byteLengthU8(input.ptr, input.len, .utf8) else 0;
|
||||
return if (input.len > 0) JSC.WebCore.encoding.byteLengthU8(input.ptr, input.len, .utf8) else 0;
|
||||
} else {
|
||||
const input = this.utf16Slice();
|
||||
return if (input.len > 0) bun.strings.elementLengthUTF16IntoUTF8([]const u16, input) else 0;
|
||||
|
||||
Reference in New Issue
Block a user