void KURL::removePort() { if (hasPort()) { String urlWithoutPort = m_url.string().left(hostEnd()) + m_url.string().substring(pathStart()); m_url.setUtf8(urlWithoutPort.utf8()); } }
bool KURL::hasPort() const { return hostEnd() < pathStart(); }