diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/stable/string.cpp | 6 | ||||
| -rw-r--r-- | src/stable/string.h | 2 |
2 files changed, 8 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 | ||
| 166 | Bu::String::String( const class Bu::Blob &rSrc ) | ||
| 167 | { | ||
| 168 | append( rSrc.getData(), rSrc.getSize() ); | ||
| 169 | } | ||
| 170 | |||
| 165 | Bu::String::String( const Bu::String::const_iterator &s ) | 171 | Bu::String::String( const Bu::String::const_iterator &s ) |
| 166 | { | 172 | { |
| 167 | append( s ); | 173 | append( s ); |
diff --git a/src/stable/string.h b/src/stable/string.h index a5e21cb..89601a7 100644 --- a/src/stable/string.h +++ b/src/stable/string.h | |||
| @@ -23,6 +23,7 @@ | |||
| 23 | namespace Bu | 23 | namespace Bu |
| 24 | { | 24 | { |
| 25 | class String; | 25 | class String; |
| 26 | class Blob; | ||
| 26 | class MemBuf; | 27 | class MemBuf; |
| 27 | 28 | ||
| 28 | /** @cond DEVEL */ | 29 | /** @cond DEVEL */ |
| @@ -573,6 +574,7 @@ namespace Bu | |||
| 573 | String( const String &rSrc, long nLength ); | 574 | String( const String &rSrc, long nLength ); |
| 574 | String( const String &rSrc, long nStart, long nLength ); | 575 | String( const String &rSrc, long nStart, long nLength ); |
| 575 | String( long nSize ); | 576 | String( long nSize ); |
| 577 | String( const class Blob &rSrc ); | ||
| 576 | virtual ~String(); | 578 | virtual ~String(); |
| 577 | 579 | ||
| 578 | /** | 580 | /** |
