// Include custom header files
#include "EncryptableString.h"

void EncryptableString::encrypt() { // Function to increase the ASCII values of each character in a string

	string estring = *this; // Store the current object value in a string to be manipulated

	for (size_t i = 0; i < estring.length(); i++) { // For loop to increase each character by one
		if (estring[i] == 'z') { // Prevent default if 'z' and use 'a'
			estring[i] = 'a';
		} else if (estring[i] == 'Z') { // Prevent default if 'Z' and use 'A'
			estring[i] = 'A';
		} else { // Increase each character by one
			char temp = estring[i];
			temp++;
			estring[i] = temp;
		}
	}

	*this = estring; // Store object string as modified string

}
