Skip to content

Commit fe64d3c

Browse files
committed
feat: add string helper
1 parent 1958e13 commit fe64d3c

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

lib/type_extensions/string.dart

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,4 +172,14 @@ extension ExtensionOnString on String {
172172

173173
return false;
174174
}
175+
176+
String toFirstLetterUpperCase()
177+
{
178+
if (isNullOrEmpty)
179+
{
180+
return this;
181+
}
182+
183+
return substring(0, 1).toUpperCase() + substring(1);
184+
}
175185
}

0 commit comments

Comments
 (0)