sdr=...@(S,N)S([1,N+2:end-N-1,end]) sdr('ABCDEFGHIJKLMNOP',3)sdr('Hello',1)sdr('123321',2)
Standard input is empty
sdr = @(S, N) S ([1, N + 2:end - N - 1, end]) ans = AEFGHIJKLP ans = Hlo ans = 11
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!