Home » U++ Library support » U++ Core » Suggestion for StringBuffer
Suggestion for StringBuffer [message #44904] |
Mon, 20 July 2015 00:50  |
rxantos
Messages: 73 Registered: October 2011
|
Member |
|
|
Could it be possible to Add
void Set(const String& s);
StringBuffer(const String& s){ Zero(); Set(s);}
to StringBuffer in uppsrc/Core/String.h
and
void StringBuffer::Set(const String& s)
{
int len = s.GetLength();
if(0 < len) {
SetLength(len);
memcpy(begin, s.Begin(), len);
} else {
Zero();
}
}
in uppsrc/Core/String.cpp
Sometimes I need top create a string buffer from a constant string to edit in a copy without affecting the original.
[Updated on: Mon, 20 July 2015 00:52] Report message to a moderator
|
|
|
|
Goto Forum:
Current Time: Sun Jun 22 07:32:23 CEST 2025
Total time taken to generate the page: 0.04108 seconds
|