Skip to main content
3 of 3
edited body
Okx
  • 16.4k
  • 5
  • 44
  • 113

Java 8, 100 bytes

s->{int i=0;for(byte b:s.getBytes()){if(b==59)i++;if(b==35){System.out.print((char)(i%127));i=0;}}};

Try it online!

svp
  • 191
  • 4