Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
apollo
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
openSource
apollo
Commits
2a8c3a24
Commit
2a8c3a24
authored
Sep 11, 2017
by
Jason Song
Committed by
GitHub
Sep 11, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #753 from Acceml/huming
clean code for isBlank
parents
2b49ae56
bfba1d30
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
13 deletions
+3
-13
Utils.java
.../java/com/ctrip/framework/foundation/internals/Utils.java
+3
-13
No files found.
apollo-core/src/main/java/com/ctrip/framework/foundation/internals/Utils.java
100644 → 100755
View file @
2a8c3a24
package
com
.
ctrip
.
framework
.
foundation
.
internals
;
import
com.google.common.base.Strings
;
public
class
Utils
{
public
static
boolean
isBlank
(
String
str
)
{
if
(
str
==
null
||
str
.
length
()
==
0
)
{
return
true
;
}
int
length
=
str
.
length
();
for
(
int
i
=
0
;
i
<
length
;
i
++)
{
char
ch
=
str
.
charAt
(
i
);
if
(!
Character
.
isWhitespace
(
ch
))
{
return
false
;
}
}
return
true
;
return
Strings
.
nullToEmpty
(
str
).
trim
().
isEmpty
();
}
public
static
boolean
isOSWindows
()
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment