RosettaCodeData/Task/Reverse-a-string/Octave/reverse-a-string.octave

3 lines
40 B
Plaintext

s = "a string";
rev = s(length(s):-1:1)