go-arbitrary/t_phonenumber_egypt_4_4.go

37 lines
510 B
Go
Raw Normal View History

2021-11-22 16:48:48 +00:00
package arbitrary
import (
"fmt"
)
func (arb T) phonenumber_egypt_4_4(areacode string) string {
var localpart1 int
{
localpart1 = arb.randomness.Intn(10000)
}
var localpart2 int
{
localpart2 = arb.randomness.Intn(10000)
}
var format string
{
var formats []string = []string{
"0%s-%04d-%04d",
"+20-%s-%04d-%04d",
}
format = formats[arb.randomness.Intn(len(formats))]
}
var result string
{
result = fmt.Sprintf(format, areacode, localpart1, localpart2)
}
return result
}