-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtext_editor.h
More file actions
59 lines (41 loc) · 1.43 KB
/
text_editor.h
File metadata and controls
59 lines (41 loc) · 1.43 KB
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#ifndef TEXTEDITOR_H_
#define TEXTEDITOR_H_
#include <string>
#include <sstream>
#include <cmath>
#include <vector>
using namespace std;
/*
template <typename T>
string toString(T var);
string toString(long double var);
string toString(int var);*/
/*double convertToNumber(char c);
double convertToNumber(string str);*/
//int search(char c, string str);
//------------------------------------------------
void clear(char c, string &str);
void clear(int i, string &str);
bool compare(string input , string keyword , int index);
int search_first(string input , string keyword);
vector<int> search_all(string input , string keyword);
bool exist_in(string input , string keyword);
bool exist_in(string input , char c);
string copy_part_of_string(string str, int down, int up);
void cut(string &input , int down , int up , string replacement);
void insert_at(string &input , int index , string to_be_inserted);
void insert_at(string &input , vector<int> index , string to_be_inserted);
void insert_after_each(string &input , string to_be_inserted , string after);
string char_to_string(char c);
bool isNumber(char c);
bool isArithmeticSign(char c);
bool is_letter(char c);
bool is_capital(char c);
bool is_small(char c);
string capitalize(string &input , int index);
string capitalize_all(string &input);
char capitalize(char c);
string uncapitalize(string &input , int index);
string uncapitalize_all(string &input);
char uncapitalize(char c);
#endif