/////////////////////////////////////////////////////////////////////////////
-// Name: string.cpp
+// Name: src/common/string.cpp
// Purpose: wxString class
// Author: Vadim Zeitlin, Ryan Norton
// Modified by:
#include "wx/wxprec.h"
#ifdef __BORLANDC__
- #pragma hdrstop
+ #pragma hdrstop
#endif
#ifndef WX_PRECOMP
- #include "wx/defs.h"
- #include "wx/string.h"
- #include "wx/intl.h"
- #include "wx/thread.h"
+ #include "wx/string.h"
+ #include "wx/intl.h"
+ #include "wx/thread.h"
#endif
#include <ctype.h>
#include <stdlib.h>
#ifdef __SALFORDC__
- #include <clib.h>
+ #include <clib.h>
#endif
// allocating extra space for each string consumes more memory but speeds up
{
if ( nLength == npos )
{
- nLength = (size_t)-1;
- }
- else if ( nLength == length() )
- {
- // this is important to avoid copying the string in cMB2WC: we're
- // already NUL-terminated so we can pass this NUL with the data
- nLength++;
+ nLength = wxNO_LEN;
}
size_t nLenWide;
{
if ( nLength == npos )
{
- nLength = (size_t)-1;
- }
- else if ( nLength == length() )
- {
- // this is important to avoid copying the string in cMB2WC: we're
- // already NUL-terminated so we can pass this NUL with the data
- nLength++;
+ nLength = wxNO_LEN;
}
size_t nLenMB;