allan.conda
07/20/2021, 10:15 PMclass EventTypeA(eventName: String)
class EventTypeB(eventName: String)
// this type of string is in a particular format, and can be interpreted in another format
fun String.convertToAnotherFormat() { ... }
data class EventName(value: String)
I think this will work, just wondering if there’s a better way to represent a “particular type of String” kind of like just extending the String. I just want a particular set of convenience function only work for these Strings.
Something like typealias
but that one still allows these functions to be used in any String because it’s just an aliasHanno
07/20/2021, 10:24 PMallan.conda
07/20/2021, 11:06 PMPaul Griffith
07/20/2021, 11:46 PMallan.conda
07/21/2021, 10:14 AMHanno
07/21/2021, 6:58 PM