void KURL::setFragmentIdentifier(const String& s) { // This function is commonly called to clear the ref, which we // normally don't have, so we optimize this case. if (s.isNull() && !m_url.m_parsed.ref.is_valid()) return; KURLGooglePrivate::Replacements replacements; if (s.isNull()) replacements.ClearRef(); else replacements.SetRef(CharactersOrEmpty(s), url_parse::Component(0, s.length())); m_url.replaceComponents(replacements); }
void KURL::removeFragmentIdentifier() { KURLGooglePrivate::Replacements replacements; replacements.ClearRef(); m_url.replaceComponents(replacements); }