Reverses the order of characters of a string.
Kernel.bdh
Strrev(inout sString: string): string;
The reversed string.
Parameter | Description |
---|---|
sString | String to reverse. This parameter also contains the result after the Strrev operation. |
dcltrans transaction TStrrev var sString: string; begin sString := "Hello world!"; write("String = "); write(sString); writeln; // reverse characters of string Strrev(sString); write("String = "); write(sString); writeln; end TStrrev;
String = Hello world! String = !dlrow olleH