コード例 #1
0
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();
}
コード例 #2
0
ファイル: fs_inet.cpp プロジェクト: Ailick/rpcs3
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;
}