Skip to main content
13 of 13
Commonmark migration

C, 120 151 140 111 108 105 104 92 90 Bytes

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

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

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