We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
getHostname
1 parent 5112c4c commit eda77d1Copy full SHA for eda77d1
src/url.zig
@@ -69,8 +69,9 @@ pub const URL = struct {
69
return ada.getHref(self.internal);
70
}
71
72
- pub fn hostname(self: URL) []const u8 {
73
- return ada.getHostname(self.internal);
+ pub fn getHostname(self: URL) []const u8 {
+ const hostname = ada.getHostnameNullable(self.internal);
74
+ return hostname.data[0..hostname.length];
75
76
77
pub fn getFragment(self: URL) ?[]const u8 {
0 commit comments