From 2dd476ff6dc904174446f269eeb97ccf9ed8c379 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Thu, 7 Jan 2010 00:21:32 +0000 Subject: Added a function that really should have always been in FString... --- src/fbasicstring.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'src') diff --git a/src/fbasicstring.h b/src/fbasicstring.h index c885cbb..838fbc2 100644 --- a/src/fbasicstring.h +++ b/src/fbasicstring.h @@ -758,6 +758,25 @@ namespace Bu _hardCopy(); core->appendChunk( pNew ); } + + /** + * Append data to your string. + *@param pData (const chr *) The data to append. + *@param nStart (long) The start position to copy from. + *@param nLen (long) The length of the data to append. + */ + void append( const chr *pData, long nStart, long nLen ) + { + if( nLen == 0 ) + return; + + Chunk *pNew = core->newChunk( nLen ); + + cpy( pNew->pData, pData+nStart, nLen ); + + _hardCopy(); + core->appendChunk( pNew ); + } /** * Append a single chr to your string. -- cgit v1.2.3