예제 #1
0
BoyerMoore::BoyerMoore(const char* aCstr)
{
	mPat	=	NULL;

    size_t len = strlen(aCstr);
    _Assign(aCstr, len);
}
예제 #2
0
파일: string.cpp 프로젝트: Jerryang/cdec
CDEC_NS_BEGIN
// -------------------------------------------------------------------------- //

void stringx::_Append(PCWSTR pwszRhs, size_t lenRhs)
{
	size_t lenLhs = m_pContent->Length();
	PCWSTR pwszLhs = m_pContent->Content();

	size_t lenResult = lenLhs + lenRhs;
	StringContent* pcontNew = StringContent::CreateRawInstance(lenResult);

	pcontNew->CopyChars(pwszLhs, lenLhs, 0);
	pcontNew->CopyChars(pwszRhs, lenRhs, lenLhs);
	pcontNew->WriteTerminatorChar();

	Clear();
	_Assign(pcontNew);
	pcontNew->Release();
}
		void assign(_Iter _First, _Iter _Last)
		{	// assign [_First, _Last)
		_Assign(_First, _Last, _Iter_cat(_First));
		}
예제 #4
0
void DwBoyerMoore::Assign(const DwString& aStr)
{
    _Assign(aStr.data(), aStr.length());
}
예제 #5
0
void DwBoyerMoore::Assign(const char* aCstr)
{
    size_t len = strlen(aCstr);
    _Assign(aCstr, len);
}
예제 #6
0
const DwBoyerMoore & DwBoyerMoore::operator=( const DwBoyerMoore & other )
{
    if (this != &other)
        _Assign(other.mPat, other.mPatLen);
    return *this;
}
예제 #7
0
DwBoyerMoore::DwBoyerMoore(const DwBoyerMoore & other)
  : mPat( 0 ), mCiPat( 0 )
{
    _Assign(other.mPat, other.mPatLen);
}
예제 #8
0
DwBoyerMoore::DwBoyerMoore(const DwString& aStr)
  : mPat( 0 ), mCiPat( 0 )
{
    _Assign(aStr.data(), aStr.length());
}
예제 #9
0
DwBoyerMoore::DwBoyerMoore(const char* aCstr)
  : mPat( 0 ), mCiPat( 0 )
{
    size_t len = strlen(aCstr);
    _Assign(aCstr, len);
}
예제 #10
0
/* void assign (in nsIPrintSettings aPS); */
NS_IMETHODIMP
nsPrintSettings::Assign(nsIPrintSettings *aPS)
{
    NS_ENSURE_ARG(aPS);
    return _Assign(aPS);
}
예제 #11
0
 SmartPointer& operator=(const SmartPointer<T> &other) {
     if (this != &other) {
         _Assign(other);
     }
     return *this;
 }
예제 #12
0
 SmartPointer(const SmartPointer<T> &other) {
     _Assign(other);
 }