Last active
January 24, 2022 04:23
-
-
Save bwnyasse/8f1cf68bc1013c9c116384afa252ffa0 to your computer and use it in GitHub Desktop.
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
/* | |
* Dart & Flutter - Training | |
* | |
* Copyright (c) Boris-Wilfried Nyasse | |
* All rights reserved | |
* | |
*/ | |
void main() { | |
print(StringUtil.isValidName('Pizza')); | |
} | |
class StringUtil { | |
// Helper or Utility Method | |
static bool isValidName(String str) { | |
return !str.contains(RegExp(r'[0–9]')); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment