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/seminar03_initialization/08_stringview/main.cpp

19 lines
403 B
C++
Raw Normal View History

2022-10-22 18:26:37 +03:00
#include <iostream>
2022-10-22 21:32:50 +03:00
//#include "miptstring.cpp"
//#include "miptstringview.cpp"
#include "mipt.h"
2022-10-22 19:15:34 +03:00
2022-10-22 18:26:37 +03:00
using namespace std;
int main() {
2022-10-22 19:15:34 +03:00
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(5);
cout << av << endl;
2022-10-22 18:26:37 +03:00
}