|
|
@ -4,6 +4,8 @@
|
|
|
|
#include <algorithm>
|
|
|
|
#include <algorithm>
|
|
|
|
#include <cstdlib>
|
|
|
|
#include <cstdlib>
|
|
|
|
#include <cstring>
|
|
|
|
#include <cstring>
|
|
|
|
|
|
|
|
//#include "miptstringview.cpp"
|
|
|
|
|
|
|
|
|
|
|
|
using std::cout, std::cin, std::endl, std::size_t;
|
|
|
|
using std::cout, std::cin, std::endl, std::size_t;
|
|
|
|
|
|
|
|
|
|
|
|
namespace mipt{
|
|
|
|
namespace mipt{
|
|
|
@ -39,7 +41,15 @@ public:
|
|
|
|
|
|
|
|
|
|
|
|
String() : String("") {}
|
|
|
|
String() : String("") {}
|
|
|
|
String(const String& s) : String(s.cStr()) {}
|
|
|
|
String(const String& s) : String(s.cStr()) {}
|
|
|
|
|
|
|
|
/* String(const mipt::StringView& sv) {
|
|
|
|
|
|
|
|
mSize = sv.size();
|
|
|
|
|
|
|
|
self.reserve(mSize);
|
|
|
|
|
|
|
|
for(int i = 0; i < mSize; ++i)
|
|
|
|
|
|
|
|
mpData[i] = sv[i];
|
|
|
|
|
|
|
|
mpData[mSize] = '\0';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
*/
|
|
|
|
String(size_t n, char a)
|
|
|
|
String(size_t n, char a)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
resize(n);
|
|
|
|
resize(n);
|
|
|
@ -218,4 +228,5 @@ std::istream& operator>>(std::istream& in, String& s)
|
|
|
|
return in;
|
|
|
|
return in;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|