I'm trying to learn recursion in pascal, and i have this code to invert a string with recursion :
Function Invert (ch:string) : string;
if ch='' then
If the string is empty, its inversion is just the empty string; otherwise, the inversion is the last character followed by the inversion of (the string minus its last character).
Fortunately, you have a function that can invert a string: