]>
git.saurik.com Git - wxWidgets.git/blob - utils/HelpGen/src/wx_extra_imps.cpp
7 // For compilers that support precompilation, includes "wx.h".
17 copystring (const char *s
)
19 if (s
== NULL
) s
= "";
20 size_t len
= strlen (s
) + 1;
22 char *news
= new char[len
];
23 memcpy (news
, s
, len
); // Should be the fastest
30 void WXDLLEXPORT
wxSplitPath(const char *pszFileName
,
35 wxCHECK_RET( pszFileName
, _("NULL file name in wxSplitPath") );
37 const char *pDot
= strrchr(pszFileName
, wxFILE_SEP_EXT
);
38 const char *pSepUnix
= strrchr(pszFileName
, wxFILE_SEP_PATH_UNIX
);
39 const char *pSepDos
= strrchr(pszFileName
, wxFILE_SEP_PATH_DOS
);
41 // take the last of the two
42 size_t nPosUnix
= pSepUnix
? pSepUnix
- pszFileName
: 0;
43 size_t nPosDos
= pSepDos
? pSepDos
- pszFileName
: 0;
44 if ( nPosDos
> nPosUnix
)
46 // size_t nLen = Strlen(pszFileName);
49 *pstrPath
= wxString(pszFileName
, nPosUnix
);
51 size_t nPosDot
= pDot
- pszFileName
;
53 *pstrName
= wxString(pszFileName
+ nPosUnix
+ 1, nPosDot
- nPosUnix
);
55 *pstrExt
= wxString(pszFileName
+ nPosDot
+ 1);
59 *pstrName
= wxString(pszFileName
+ nPosUnix
+ 1);
65 wxLocale
*wxGetLocale()
70 const char *wxLocale::GetString(const char *szOrigString
,
77 const char *wxGetTranslation(const char *str
)