I'd like to share my program with some friends to show off, but naturally a lot of them are on Apple products... I use `clang` to compile.

::: spoiler 263 lines of code

```
#include
#include

//Function declarations
void promptchoice_main(void);
void promptchoice_main_again(void);
void promptinput(void);
void promptchoice_trim(void);
void executechoice(char choice_trim);
void trimnumbers(void);
void trimwhitespace(void);
void trimletters(void);
void trimspecial(void);
void specifyspecial(void);
void printresult(char input[]);

//Global variables
char choice_main = 0x00;
char choice_trim = 0x00;
char choice_detail = 0x00;
char input[1000] = "";
char previous_input[1000] = "";

//Remove specific numbers, letters, punctuation or whitespace characters from input.
int main() {
printf("\nWelcome! This program trims text by removing unwanted characters.\n"๐Ÿ˜‰;
while (1) {
if (strlen(previous_input) == 0) { // Check for previously trimmed text in memory.
promptchoice_main();
if (choice_main == 'E'๐Ÿ˜‰ { break; }
if (choice_main == 'T'๐Ÿ˜‰ {
promptinput();
promptchoice_trim();
executechoice(choice_trim);
printresult(input);
}
}
else {
promptchoice_main_again();
if (choice_main == 'E'๐Ÿ˜‰ { break; }
if (choice_main == 'T'๐Ÿ˜‰ {
promptinput();
promptchoice_trim();
executechoice(choice_trim);
printresult(input);
}
else if (choice_main == 'P'๐Ÿ˜‰ {
sprintf(input, "%s", previous_input);
printf("\nYou are trimming previously trimmed text: %s\n", input);
promptchoice_trim();
executechoice(choice_trim);
printresult(input);
}
}
}
printf("\nGoodbye!\n"๐Ÿ˜‰;
return 0;
}

//Function definitions
void promptchoice_main(void) {
while (1) {
printf("\nPress T and ENTER to trim text or E and ENTER to exit: "๐Ÿ˜‰;
scanf("%c", &choice_main);
while (getchar() != '\n'๐Ÿ˜‰ {}
if (choice_main == 'T' || choice_main == 'E'๐Ÿ˜‰ { break; }
else { printf("\nInvalid input!\n"๐Ÿ˜‰; }
}
return;
}

void promptchoice_main_again(void) {
while (1) {
printf("\nPress T and ENTER to trim new text, P and ENTER to trim previously trimmed text or E and ENTER to exit: "๐Ÿ˜‰;
scanf("%c", &choice_main);
while (getchar() != '\n'๐Ÿ˜‰ {}
if (choice_main == 'T' || choice_main == 'P' || choice_main == 'E'๐Ÿ˜‰ { break; }
else { printf("\nInvalid input!\n"๐Ÿ˜‰; }
}
return;
}

void promptinput(void) {
printf("\nEnter the text that you would like to trim and press ENTER: "๐Ÿ˜‰;
fgets(input, sizeof input, stdin);
input[strlen(input) - 1] = '\0';
return;
}

void promptchoice_trim(void) {
while (1) {
int x = 0;
int n = 0;
printf("\nWhat would you like to trim?\n1) Numbers (1, 2, 3...)\n2) Whitespace (space, tab or newline) \n3) Letters (A,B,C... a,b,c...)\n4) Special characters (!,?, . , ...)\nType one of the above numbers and press ENTER: "๐Ÿ˜‰;
scanf("%c", &choice_trim);
while (getchar() != '\n'๐Ÿ˜‰ {}
if (choice_trim < 0x31 || choice_trim > 0x34) { printf("\nInvalid choice!\n"๐Ÿ˜‰; }
else if (choice_trim == 0x31) {
for (n = strlen(input) - 1; n >= 0; n--) {
if (input[n] >= 0x30 && input[n] = 0; n--) {
if (input[n] == 0x20 || input[n] == 0x09 || input[n] == 0x0A) { x++; }
}
if (x == 0) { printf("\nNo whitespace found!\n"๐Ÿ˜‰; }
else { break; }
}
else if (choice_trim == 0x33) {
for (n = strlen(input) - 1; n >= 0; n--) {
if (input[n] >= 0x41 && input[n] < 0x5A || input[n] >= 0x61 && input[n] = 0; n--) {
if (input[n] >= 0x21 && input[n] < 0x2F || input[n] >= 0x3A && input[n] < 0x40 || input[n] >= 0x5B && input[n] < 0x60 || input[n] >= 0x7B && input[n] = 0; n--) {
if (input[n] >= 0x30 && input[n] = 0; n--) {
if (choice_detail == 'S'๐Ÿ˜‰ { if (input[n] == 0x20) { input[n] = 0x18; } } // space
else if (choice_detail == 'T'๐Ÿ˜‰ { if (input[n] == 0x09) { input[n] = 0x18; } } // tab
else if (choice_detail == 'N'๐Ÿ˜‰ { if (input[n] == 0x0A) { input[n] = 0x18; } } // newline
else if (choice_detail == 'A'๐Ÿ˜‰ { if (input[n] == 0x20 || input[n] == 0x09 || input[n] == 0x0A) { input[n] = 0x18; } }
}
return;
}

void trimletters(void) {
int x = 0;
int n = 0;
while (1) {
printf("\nType U to trim uppercase letters, L to trim lowercase letters or A to trim all letters: "๐Ÿ˜‰;
scanf("%c", &choice_detail);
while (getchar() != '\n'๐Ÿ˜‰ {}
if (choice_detail != 'U' && choice_detail != 'L' && choice_detail != 'A'๐Ÿ˜‰ { printf("\nInvalid input!\n"๐Ÿ˜‰; }
else if (choice_detail == 'U'๐Ÿ˜‰ {
for (n = strlen(input) - 1; n >= 0; n--) {
if (input[n] >= 0x41 && input[n] = 0; n--) {
if (input[n] >= 0x41 && input[n] = 0; n--) {
if (input[n] >= 0x61 && input[n] = 0; n--) {
if (input[n] >= 0