Created
August 23, 2018 07:35
-
-
Save andrcmdr/6fcf57397f5dc67c6a228bb4f5975fb4 to your computer and use it in GitHub Desktop.
DartPad
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String format_phone_num(String phone) { | |
//на вход идет: +996-552-44-23-88 | |
//на выходе: 996552442388 | |
var phoneNumber = phone; | |
phoneNumber = phoneNumber.replaceAll(new RegExp(r"[+-]"), ""); | |
return phoneNumber; | |
} | |
void main() { | |
var phonenum = format_phone_num('+996-552-44-23-88'); | |
print(phonenum); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html></html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment