Function valueLengthFromUri [src]

Prototype

pub fn valueLengthFromUri(uri: Uri) usize

Parameters

uri: Uri

Source

pub fn valueLengthFromUri(uri: Uri) usize { const user: Uri.Component = uri.user orelse .empty; const password: Uri.Component = uri.password orelse .empty; var dw: Writer.Discarding = .init(&.{}); user.formatUser(&dw.writer) catch unreachable; // discarding const user_len = dw.count + dw.writer.end; dw.count = 0; dw.writer.end = 0; password.formatPassword(&dw.writer) catch unreachable; // discarding const password_len = dw.count + dw.writer.end; return valueLength(@intCast(user_len), @intCast(password_len)); }