char *copy_array() const; // return a "new"-ed copy of contents
const char *ptr() const;
+ const char *ptr() { return ((const String *)this)->ptr(); }
/// return the data. Don't use for writing the data.
operator const char *() const { return ptr(); }
#include "vector.hh"
-#include "string.hh"
Vector::Vector(const Vector&n)
:dat(n.dat)
Vector
Vector::operator-() const
{
- Vector v(*this); v*=-1; return v;
+ Vector v(*this);
+ v*=-1;
+ return v;
}
void
sort(compare, lower, last-1);
sort(compare, last+1, lower);
}
+ void concat(svec<T> const &src) {
+ int s = size;
+ set_size(size + src.size);
+ arrcpy(thearray+s,src.thearray, src.size);
+ }
};
/**