- wxChar const * pszEndLine = wxStrchr(pszFound, wxT('\n'));
- if ( pszEndLine == NULL ) pszEndLine = pszFound + wxStrlen(pszFound);
-
-
- // wxString( wxChar*, length);
- wxString retVal( pszFound, pszEndLine - pszFound );
+ size_t endLine = trans->find(wxT('\n'), found);
+ size_t len = (endLine == wxString::npos) ?
+ wxString::npos : (endLine - found);