generated from coleca24/csce240_f21_p2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
SuperString.h
52 lines (43 loc) · 1.08 KB
/
SuperString.h
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
#ifndef SUPERSTRING_H_
#define SUPERSTRING_H_
// Author: Tatiana Washington
// Email: [email protected]
// Section #: 002
// Copyright 2021 Tatiana Washington
// Modified from template code @coleca24 GitHub
#include <iostream>
#include <string>
class SuperString {
public:
// Constructors
SuperString();
explicit SuperString(std::string);
SuperString(int, char);
SuperString(const SuperString&);
// Destructor
~SuperString();
// Member Functions
void print();
char get(int);
int length();
int find(char, int start = 0);
int find(std::string, int start = 0);
SuperString substr(int, int);
SuperString reverse();
SuperString replace(int, int, std::string);
void push_back(char);
void append(std::string);
void append(const SuperString&);
void replace(char, char);
// Extra Credit
void removeAll(char);
void replace(std::string, std::string);
bool isUpper();
bool isLower();
bool isTitleCase();
private:
// Member Variables
char *data;
int size;
};
#endif // SUPERSTRING_H_