Skip to content

Instantly share code, notes, and snippets.

@fitomad
Created September 2, 2018 19:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fitomad/98a4aa59b2a6bde2c005d4c5e7cda7f0 to your computer and use it in GitHub Desktop.
Save fitomad/98a4aa59b2a6bde2c005d4c5e7cda7f0 to your computer and use it in GitHub Desktop.
public enum OtrosDatosPersonales: String, CaseIterable {
    case correoElectronico = "email"
}
print("Puede establecer \(OtrosDatosPersonales.allCases.count) campos")
for otroDatoPersonal in OtrosDatosPersonales.allCases {
    print(otroDatoPersonal)
}
/*
correoElectrónico
*/
let otraDescripcion = OtrosDatosPersonales.allCases.map({ "\($0.rawValue)" }).joined(separator: ", ")
print(otraDescripcion)
/*
email
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment