phone number
parent
e729970554
commit
7f4a6b624f
|
@ -2,6 +2,7 @@ package arbitrary
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"strings"
|
||||||
)
|
)
|
||||||
|
|
||||||
func (arb T) phonenumber_egypt_3_4(areacode string) string {
|
func (arb T) phonenumber_egypt_3_4(areacode string) string {
|
||||||
|
@ -31,6 +32,21 @@ func (arb T) phonenumber_egypt_3_4(areacode string) string {
|
||||||
result = fmt.Sprintf(format, areacode, localpart1, localpart2)
|
result = fmt.Sprintf(format, areacode, localpart1, localpart2)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
if 0 == arb.randomness.Intn(4) {
|
||||||
|
result = strings.ReplaceAll(result, "0", "٠")
|
||||||
|
result = strings.ReplaceAll(result, "1", "١")
|
||||||
|
result = strings.ReplaceAll(result, "2", "٢")
|
||||||
|
result = strings.ReplaceAll(result, "3", "٣")
|
||||||
|
result = strings.ReplaceAll(result, "4", "٤")
|
||||||
|
result = strings.ReplaceAll(result, "5", "٥")
|
||||||
|
result = strings.ReplaceAll(result, "6", "٦")
|
||||||
|
result = strings.ReplaceAll(result, "7", "٧")
|
||||||
|
result = strings.ReplaceAll(result, "8", "٨")
|
||||||
|
result = strings.ReplaceAll(result, "9", "٩")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return result
|
return result
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,7 @@ package arbitrary
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"strings"
|
||||||
)
|
)
|
||||||
|
|
||||||
func (arb T) phonenumber_egypt_4_4(areacode string) string {
|
func (arb T) phonenumber_egypt_4_4(areacode string) string {
|
||||||
|
@ -31,6 +32,20 @@ func (arb T) phonenumber_egypt_4_4(areacode string) string {
|
||||||
result = fmt.Sprintf(format, areacode, localpart1, localpart2)
|
result = fmt.Sprintf(format, areacode, localpart1, localpart2)
|
||||||
}
|
}
|
||||||
|
|
||||||
return result
|
{
|
||||||
|
if 0 == arb.randomness.Intn(4) {
|
||||||
|
result = strings.ReplaceAll(result, "0", "٠")
|
||||||
|
result = strings.ReplaceAll(result, "1", "١")
|
||||||
|
result = strings.ReplaceAll(result, "2", "٢")
|
||||||
|
result = strings.ReplaceAll(result, "3", "٣")
|
||||||
|
result = strings.ReplaceAll(result, "4", "٤")
|
||||||
|
result = strings.ReplaceAll(result, "5", "٥")
|
||||||
|
result = strings.ReplaceAll(result, "6", "٦")
|
||||||
|
result = strings.ReplaceAll(result, "7", "٧")
|
||||||
|
result = strings.ReplaceAll(result, "8", "٨")
|
||||||
|
result = strings.ReplaceAll(result, "9", "٩")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return result
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue