mirror of
https://github.com/oven-sh/bun
synced 2026-02-10 10:58:56 +00:00
zig: delete deprecated some bun.jsc apis (#21309)
This commit is contained in:
@@ -1069,18 +1069,18 @@ pub const String = extern struct {
|
||||
const args = callFrame.arguments_old(1).slice();
|
||||
|
||||
if (args.len == 0 or !args.ptr[0].isString()) {
|
||||
return jsc.jsNumber(@as(i32, 0));
|
||||
return .jsNumber(@as(i32, 0));
|
||||
}
|
||||
|
||||
const str = try args[0].toBunString(globalObject);
|
||||
defer str.deref();
|
||||
|
||||
if (str.isEmpty()) {
|
||||
return jsc.jsNumber(@as(i32, 0));
|
||||
return .jsNumber(@as(i32, 0));
|
||||
}
|
||||
|
||||
const width = str.visibleWidth(false);
|
||||
return jsc.jsNumber(width);
|
||||
return .jsNumber(width);
|
||||
}
|
||||
|
||||
/// Reports owned allocation size, not the actual size of the string.
|
||||
|
||||
Reference in New Issue
Block a user