-
Notifications
You must be signed in to change notification settings - Fork 73
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Sort query parameters (fix #246) - Allows to (optionally) remove common irrelevant query parameters - Consistently encode query parameters with 'application/x-www-form-urlencoded'
- Loading branch information
Showing
5 changed files
with
393 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package crawlercommons.utils; | ||
|
||
/** | ||
* Util functions for manipulating strings. | ||
*/ | ||
public class Strings { | ||
|
||
public static boolean isBlank(final String cs) { | ||
if (cs == null || cs.isEmpty()) { | ||
return true; | ||
} | ||
for (int i = 0; i < cs.length(); i++) { | ||
if (Character.isWhitespace(cs.charAt(i)) == false) { | ||
return false; | ||
} | ||
} | ||
return true; | ||
} | ||
|
||
public static boolean isNotBlank(final String cs) { | ||
return !isBlank(cs); | ||
} | ||
|
||
public static boolean isEmpty(final String cs) { | ||
return cs == null || cs.length() == 0; | ||
} | ||
|
||
} |
Oops, something went wrong.