Skip to content

Instantly share code, notes, and snippets.

View cyrille-legrand's full-sized avatar

Cyrille Legrand cyrille-legrand

View GitHub Profile
@cyrille-legrand
cyrille-legrand / B64String.playground
Last active February 12, 2018 08:56
A String "subclass" that encodes to, and decodes from, a base64 String
import Foundation
public enum B64String: Encodable, Decodable, ExpressibleByStringLiteral, CustomStringConvertible, CustomDebugStringConvertible {
public var debugDescription: String {
return description
}
public var description: String {
switch self {
case let .encoded(foo): return foo

Keybase proof

I hereby claim:

  • I am cyrille-legrand on github.
  • I am cyrille (https://keybase.io/cyrille) on keybase.
  • I have a public key ASCMc8a4wH1CjsOY0Plb_5ColZaTSV0Odc0sgQI0irPedgo

To claim this, I am signing this object: