Skip to content

Instantly share code, notes, and snippets.

@sp00ck
Created August 4, 2022 14:19
Show Gist options
  • Save sp00ck/4a48e30426720de4cfc29bc50e3c35fc to your computer and use it in GitHub Desktop.
Save sp00ck/4a48e30426720de4cfc29bc50e3c35fc to your computer and use it in GitHub Desktop.
g++ -Wall -pedantic -pedantic-errors -g -L~/wx/lib `~/wx/wx-config --cxxflags --unicode` -DwxUSE_GUI=0 -L~/wx/lib `~/wx/wx-config --libs --unicode` bl.cpp -o bl
#include <wx/wx.h>
#include <wx/app.h>
#include <wx/cmdline.h>
#include <wx/intl.h>
wxLocale* locale;
int main(void)
{
wxString a,b;
wxInitializer initializer;
locale = new wxLocale( wxLANGUAGE_POLISH );
if ( !initializer.IsOk() )
{ fprintf(stderr, "Nie udało się znaleźć bibliotek programu"); return -1; }
a = wxT("bardzo|dziwny|tekst|itd|");
b = a.BeforeFirst(wxT("|"));
wxPrintf("pierwszy [%ls]\n", b );
// wxPrintf("przedostatni [%s]\n", a.BeforeLast(wxT("|")) );
delete(locale);
return 0;
}
@sp00ck
Copy link
Author

sp00ck commented Aug 4, 2022

not working BeforeLast

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment