Skip to main content
10 of 13
deleted 2 characters in body
cleblanc
  • 3.5k
  • 10
  • 16

#C, 120 151 140 111 108 105 104 93 Bytes

Working for "It's Jimmy's test" --> Bl'B Bleet'B Blet

j;f(char*m){for(;*m=!isalpha(*m)?j=0,*m:"*Blet"[j=isalpha(*(m+1))?j^3?j+1:j:j>1?4:j+1];m++);}

The output is now a side effect by destroying the original string.

main(c,v)char**v;{
    char test[] = "The End is near Fellows!";
    f(test);puts(test);
    char test2[] = "We praise the Goat God!";
    f(test2);puts(test2);
    char test3[] = "It's Jimmy's test";
    f(test3);puts(test3);
    char test4[] = "0te_st1";
    f(test4);puts(test4);
    char test5[] = "I have a pen";
    f(test5);puts(test5);
    char test6[] = "_0123456789_";
    f(test6);puts(test6);
}

I think it's correct at least now

Blt Blt Bl Blet Bleeeet!
Bl Bleeet Blt Blet Blt!
Bl'B Bleet'B Blet
0Bl_Bl1
B Blet B Blt
_012345678_
cleblanc
  • 3.5k
  • 10
  • 16