How to perform reversing of all words in a sentence.
Example
let str = \"Hello playground\"
Result should be like \"olleH dnuorg
\"olleH dnuorg
let result = String(str.reversed()) .components(separatedBy: .whitespaces) .reversed() .joined(separator: " ")