https://github.com/mohamedyounis10/simple-text-editor
This project is a simple text editor implemented in C++. It utilizes a stack-based approach to manage text operations like appending, deleting, printing, and undoing actions. The program's interface offers a menu-driven interaction for users.
https://github.com/mohamedyounis10/simple-text-editor
consulea cpp data-structures simpletext texteditor
Last synced: 11 months ago
JSON representation
This project is a simple text editor implemented in C++. It utilizes a stack-based approach to manage text operations like appending, deleting, printing, and undoing actions. The program's interface offers a menu-driven interaction for users.
- Host: GitHub
- URL: https://github.com/mohamedyounis10/simple-text-editor
- Owner: mohamedyounis10
- Created: 2024-02-23T17:07:15.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-02-23T17:16:24.000Z (over 2 years ago)
- Last Synced: 2025-02-12T02:13:27.514Z (over 1 year ago)
- Topics: consulea, cpp, data-structures, simpletext, texteditor
- Language: C++
- Homepage:
- Size: 6.84 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
To create a README for your GitHub repository containing this code, you'll want to provide an overview of what the code does, how to use it, and any additional information that might be useful for someone interested in understanding or contributing to the project. Below is a sample README template tailored to your text editor code:
---
# Simple Text Editor
This is a simple text editor program implemented in C++. It allows users to perform basic text editing operations like appending text, deleting text, printing text, and undoing previous actions. The program utilizes a stack-based approach to manage text operations, providing users with a simple yet functional text editing experience.
## Features
- **Append Text**: Users can add new strings of text to the editor.
- **Delete Text**: Users have the option to delete the last character, a specified number of characters, or an entire string.
- **Print Text**: Users can view the current text content, either the entire string or specific characters at a given index.
- **Undo**: The program supports undo functionality, allowing users to revert the last operation performed.
- **Input Validation**: Input is validated to ensure it meets the required criteria (e.g., no empty spaces or digits).
## Usage
1. **Append Text**: Choose option 1 from the menu and input the desired text to append.
2. **Delete Text**: Select option 2 from the menu and specify whether to delete the last character, a certain number of characters, or an entire string.
3. **Print Text**: Use option 3 to print either the entire string or specific characters at a given index.
4. **Undo**: Option 4 allows users to undo the last operation performed.
5. **Exit**: Choose option 5 to exit the program.
## How to Run
To run the program, follow these steps:
1. Compile the `main.cpp` file using a C++ compiler.
2. Execute the compiled binary.
```bash
g++ main.cpp -o text_editor
./text_editor
```