Logo

Programming-Idioms

History of Idiom 41 > diff from v8 to v9

Edit summary for version 9 by :

Version 8

2015-08-20, 16:35:18

Version 9

2015-08-20, 16:35:55

Idiom #41 Reverse a string

Create string t containing the same characters as string s, in reverse order.
Original string s must remain unaltered. Each character must be handled correctly regardless its number of bytes in memory.

Idiom #41 Reverse a string

Create string t containing the same characters as string s, in reverse order.
Original string s must remain unaltered. Each character must be handled correctly regardless its number of bytes in memory.

Imports
import std.range;
Imports
import std.range;
import std.array;
Code
auto s = "The key to learning D is to 脚踏实地".retro;
Code
auto s = "The key to learning D is to 脚踏实地".retro.array;
Demo URL
http://dpaste.dzfl.pl/eeb984cbd621
Demo URL
http://dpaste.dzfl.pl/eeb984cbd621