Skip to content

Instantly share code, notes, and snippets.

@bwnyasse
Last active January 24, 2022 04:23
Show Gist options
  • Save bwnyasse/8f1cf68bc1013c9c116384afa252ffa0 to your computer and use it in GitHub Desktop.
Save bwnyasse/8f1cf68bc1013c9c116384afa252ffa0 to your computer and use it in GitHub Desktop.
/*
* 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