forked from dharmanshu1921/Java
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathComplete_String.cpp
More file actions
30 lines (24 loc) · 660 Bytes
/
Copy pathComplete_String.cpp
File metadata and controls
30 lines (24 loc) · 660 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#include <iostream>
#include<bits/stdc++.h>
using namespace std;
int main(){
// string s("Lokesh Singh is my name");
// cout<<"The length of string is: "<<s.length()<<endl;
// cout<<s<<endl;
// s.clear();
// cout<<"Printing string after clearing"<<s<<endl;
// cout<<"The length of string is after clearing : "<<s.length()<<endl;
// string h(5 ,'*');
// cout<<h<<endl;
// string s1("Lokesh ");
// string s2("Singh");
// s1.append(s2);
// cout<<s1<<endl;
// string s3 = s1.substr(0,6);
// cout<<s3<<endl;
string s1 = "Lokesh Singh is learning coding";
s1.erase(1,3);
cout<<s1<<endl;;
cout<<s1.find("learn")<<endl;;
return 0;
}