Android Open Source - ponyville-live-android Strings

From Project

Back to project page ponyville-live-android.


The source code is released under:

Apache License

If you think the Android project ponyville-live-android listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

/*  ww  w.j  a  v a  2s. co m*/
public final class Strings {
    private Strings() {
        // No instances.

    public static boolean isBlank(CharSequence string){
        return (string == null || string.toString().trim().length() == 0);

    public static String valueOrDefault(String string, String defaultString) {
        return isBlank(string) ? defaultString : string;

    public static String truncateAt(String string, int length) {
        return string.length() > length ? string.substring(0, length) : string;

Java Source Code List