/* * 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 | 11893 | Robert Cowham |
Populate -o //guest/robert_cowham/perforce/P4OFC/main/... //guest/robert_cowham/perforce/P4OFC/icm/.... |
||
//guest/robert_cowham/perforce/P4OFC/main/libp4gt/UniStrBuf.cpp | |||||
#1 | 10843 | Robert Cowham |
Initial version of P4OFC source code. See README.txt (and LICENSE.txt and doc\P4OFC-Design.docx) |