Phrase reversals: Difference between revisions

m
(Task clarification without changing intent,)
Line 701:
</lang>
=={{header|Elena}}==
ELENA 3.34 :
<lang elena>import extensions.
import extensions'text.
import system'routines.
programpublic =program
[
var reverse := (:s)(s toArray; sequenceReverse; summarize(StringStringWriter new)).
var phrase := "rosetta code phrase reversal".
Line 715 ⟶ 716:
console printLine(reverse(phrase)).
//Reverse each individual word in the string, maintaining original string order.
console printLine(phrase split bysplitBy:" "; selectBy(:s)(reverse(s) add(" ")); summarize(String new)).
//Reverse the order of each word of the phrase, maintaining the order of characters in each word.
console printLine(reverse(phrase split bysplitBy:" "; selectBy(:s)(s + " "))).
].</lang>
{{out}}
<pre>
Anonymous user