Skip to content

Commit

Permalink
feat: Registration completed screen - implement capitalize edge cases
Browse files Browse the repository at this point in the history
  • Loading branch information
digitalheartxs committed Oct 14, 2024
1 parent 231560c commit df53a61
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion catalyst_voices/lib/common/ext/string_ext.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
extension StringExt on String {
String capitalize() {
return '${this[0].toUpperCase()}${substring(1).toLowerCase()}';
if (isNotEmpty) {
return '${this[0].toUpperCase()}${substring(1).toLowerCase()}';
} else {
return '';
}
}
}

0 comments on commit df53a61

Please sign in to comment.