Toggle navigation
Toggle navigation
This project
Loading...
Sign in
flutter_package
/
fluttertpc_get
Go to a project
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
sumitsharansatsangi
2023-07-16 16:27:14 +0530
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
2766c0d4c7fe0eed3c24aabc18d196b14f4b713c
2766c0d4
1 parent
8068fb45
unnecessary null checking removed
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
lib/get_utils/src/get_utils/get_utils.dart
lib/get_utils/src/get_utils/get_utils.dart
View file @
2766c0d
...
...
@@ -499,14 +499,14 @@ class GetUtils {
/// Capitalize each word inside string
/// Example: your name => Your Name, your name => Your name
static
String
?
capitalize
(
String
value
)
{
static
String
capitalize
(
String
value
)
{
if
(
isBlank
(
value
)!)
return
value
;
return
value
.
split
(
' '
).
map
(
capitalizeFirst
).
join
(
' '
);
}
/// Uppercase first letter inside string and let the others lowercase
/// Example: your name => Your name
static
String
?
capitalizeFirst
(
String
s
)
{
static
String
capitalizeFirst
(
String
s
)
{
if
(
isBlank
(
s
)!)
return
s
;
return
s
[
0
].
toUpperCase
()
+
s
.
substring
(
1
).
toLowerCase
();
}
...
...
Please
register
or
login
to post a comment