Anonymous user
Base64 decode data: Difference between revisions
→{{header|Standard ML}}
m (→{{header|Wren}}: Minor tidy) |
imported>Regattaguru |
||
Line 1,945:
To err is human, but to really foul things up you need a computer.
-- Paul R. Ehrlich </pre>
=={{header|Swift}}==
<syntaxhighlight lang="swift">
import Foundation
let input = """
VG8gZXJyIGlzIGh1bWFuLCBidXQgdG8gcmVhbGx5IGZvdWwgdGhpbmdzIHVwIHlvdSBuZWVkIGEgY29tcHV0ZXIuCiAgICAtLSBQYXVsIFIuIEVocmxpY2g=
"""
if let decoded = Data(base64Encoded: input),
let str = String(data: decoded, encoding: .utf8) {
print( str )
}
</syntaxhighlight>
<pre>
To err is human, but to really foul things up you need a computer.
-- Paul R. Ehrlich
</pre>
=={{header|Tcl}}==
<syntaxhighlight lang="tcl">package require tcl 8.6
|