I have a case class
case class SiteID(channel: String, locale: String)
Locale can be "en-GB" or "en_GB" . So I want to replace the hyphen by underscore.
The idea is to transform , so there is this equality
SiteID("blabla","en-GB") == SiteID("blabla","en_GB")
I tried with the following code
case class SiteID(channel: String, locale: String)
object SiteID{
def apply(channel: String, locale: String):SiteID = SiteID(channel,locale.replace("-","_") )
}