/*
* Copyright 2004 Perforce Software. All rights reserved.
*
* Developed by Data Shades Ltd.
*/
#include "UniStrBuf.h"
#include "debug.h"
void UniStrBuf::Append( const TCHAR *buf, int len )
{
StrBuf::Extend( (char *)buf, len );
StrBuf::Extend( "\0\0", 2 );
length -= 2;
}
void UniStrBuf::Append( const TCHAR *buf )
{
int len = _tcslen( buf ) * sizeof( TCHAR );
Append( buf, len );
}
void UniStrBuf::Append( const StrPtr *s )
{
Append( (TCHAR *)s->Text() );
}
void UniStrBuf::Set( const TCHAR *buf, int len )
{
Clear();
StrBuf::Extend( (char *)buf, len );
StrBuf::Extend( "\0\0", 2 );
length -= 2;
}
void UniStrBuf::Set( const TCHAR *buf )
{
int len = _tcslen( buf ) * sizeof( TCHAR );
Set( buf, len );
}
void UniStrBuf::Set( const StrPtr *s )
{
Set( (TCHAR *)s->Text() );
}
int UniStrBuf::Length() const
{
return length / sizeof( TCHAR );
}
# |
Change |
User |
Description |
Committed |
|
#1
|
10140 |
Matt Attaway |
Initial release of the P4GT source code. |
|
|