zig: delete deprecated some bun.jsc apis (#21309)

This commit is contained in:
Meghan Denny
2025-07-23 16:10:58 -08:00
committed by GitHub
parent ace81813fc
commit e8d0935717
23 changed files with 60 additions and 70 deletions

View File

@@ -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.