string formatNumber(uint64 f) { locale myloc( locale(), // C++ default locale new Comma);// Own numeric facet ostringstream out; out.imbue(myloc); out << f; return out.str(); }
static wxString StripProtocolAnchor(const wxString& location) { wxString myloc(location.BeforeLast(wxT('#'))); if (myloc.empty()) myloc = location.AfterFirst(wxT(':')); else myloc = myloc.AfterFirst(wxT(':')); // fix malformed url: if (!myloc.Left(2).IsSameAs(wxT("//"))) { if (myloc.GetChar(0) != wxT('/')) myloc = wxT("//") + myloc; else myloc = wxT("/") + myloc; } if (myloc.Mid(2).Find(wxT('/')) == wxNOT_FOUND) myloc << wxT('/'); return myloc; }