Login
|
Signup
langref.org
-
fsharp
and
fantom
add..
all
clojure
cpp
csharp
erlang
go
groovy
haskell
java
ocaml
perl
php
python
ruby
scala
Home
All
Solved
Unsolved
Strings
Numbers
Regex
Lists
Maps
Structure
Files
Dates
OOP
Networking
XML
Algorithms
Misc
Parallel
View Problem
Strings
Manipulation
Reverse the words in a string
Given the string
"This is a end, my only friend!"
, produce the string
"friend! only my end, the is This"
fsharp
let reversed = String.Join(" ", Array.rev("This is the end, my only friend!".Split [|' '|]))
#light
open System
let reversed = String.Join(" ", Array.rev("This is the end, my only friend!".Split [|' '|]))
printfn "%s" reversed
fantom
"This is a end, my only friend!".split.reverse.join(" ")
class SolutionXX
{
Void main()
{
"This is a end, my only friend!".split.reverse.join(" ")
}
}
Submit a new solution for
fsharp
or
fantom
There are 25 other solutions in
additional
languages (
clojure
,
cpp
,
csharp
,
erlang
...)