Instantly share code, notes, and snippets.

Embed
What would you like to do?
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