aboutsummaryrefslogtreecommitdiff
path: root/src/stable/string.cpp
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2020-03-24 13:16:22 -0700
committerMike Buland <eichlan@xagasoft.com>2020-03-24 13:16:22 -0700
commit4219be08c02b3f0a5ec214447dfa0918fa390176 (patch)
treeb0b9cf359471db16fc6b1de8b3a3daffdac81fa6 /src/stable/string.cpp
parentde026982f5273807669c13fab9c79dffaeb8c253 (diff)
downloadlibbu++-4219be08c02b3f0a5ec214447dfa0918fa390176.tar.gz
libbu++-4219be08c02b3f0a5ec214447dfa0918fa390176.tar.bz2
libbu++-4219be08c02b3f0a5ec214447dfa0918fa390176.tar.xz
libbu++-4219be08c02b3f0a5ec214447dfa0918fa390176.zip
Temporary interop to convert blob to strings.
This will make the transition easier and require fewer rewrites later.
Diffstat (limited to 'src/stable/string.cpp')
-rw-r--r--src/stable/string.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/stable/string.cpp b/src/stable/string.cpp
index 1e00ba5..dac690b 100644
--- a/src/stable/string.cpp
+++ b/src/stable/string.cpp
@@ -12,6 +12,7 @@
12#include "bu/hash.h" 12#include "bu/hash.h"
13#include "bu/membuf.h" 13#include "bu/membuf.h"
14#include "bu/formatter.h" 14#include "bu/formatter.h"
15#include "bu/blob.h"
15#include <stdlib.h> 16#include <stdlib.h>
16 17
17#define nMinSize (256) 18#define nMinSize (256)
@@ -162,6 +163,11 @@ Bu::String::String( long nSize )
162 core->nLength = nSize; 163 core->nLength = nSize;
163} 164}
164 165
166Bu::String::String( const class Bu::Blob &rSrc )
167{
168 append( rSrc.getData(), rSrc.getSize() );
169}
170
165Bu::String::String( const Bu::String::const_iterator &s ) 171Bu::String::String( const Bu::String::const_iterator &s )
166{ 172{
167 append( s ); 173 append( s );