This repository has been archived on 2023-05-13. You can view files and clone it, but cannot push or open issues or pull requests.
mipt_cpp/term1/seminar03_initialization/08_stringview/main.cpp
2023-02-25 19:34:24 +03:00

18 lines
450 B
C++

#include <iostream>
#include "miptstring.h"
#include "miptstringview.h"
using namespace std;
int main() {
mipt::String a = "abcd";
mipt::String b = "abce";
mipt::StringView av = a;
mipt::StringView bv = b;
//cout << (b < a) << endl;
//cout << (bv < av) << endl;
cout << av.substr(1,10) << endl;
av.remove_suffix(2);
cout << av << endl;
mipt::String meow = av;
cout << "sv to string: " << meow << endl;
}