Back to project page notes.
The source code is released under:
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE Version 2, December 2004 Copyright (C) 2004 Sam Hocevar <sam@hocevar.net> Everyone is permitted to copy and distribute verbatim or...
If you think the Android project notes listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.iliakplv.notes.utils; //from ww w . j a v a 2s . c om public final class StringUtils { private StringUtils() { throw new AssertionError("Instance creation not allowed!"); } public static String getNotNull(String s) { return s != null ? s : ""; } public static boolean isNullOrEmpty(String s) { return s == null || s.length() == 0; } public static boolean isBlank(String s) { return s == null || s.trim().length() == 0; } public static String normalizeString(String s) { return s == null ? null : s.trim().toLowerCase(); } public static String wrapWithEmptyLines(String string) { return "\n" + string + "\n"; } public static boolean equals(String s1, String s2) { if (s1 == null && s2 == null) { return true; } else if (s1 != null) { return s1.equals(s2); } else { // s2 != null return s2.equals(s1); } } }