Logo

Programming-Idioms

History of Idiom 41 > diff from v9 to v10

Edit summary for version 10 by :

Version 9

2015-08-20, 16:35:55

Version 10

2015-08-20, 16:37:15

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;
import std.array;
Imports
import std.range;
import std.array;
Code
auto s = "The key to learning D is to 脚踏实地".retro.array;
Code
auto t = "The key to learning D is to 脚踏实地".retro.array;
Demo URL
http://dpaste.dzfl.pl/eeb984cbd621
Demo URL
http://dpaste.dzfl.pl/b21510935840