Example usage for android.text TextUtils isPrintableAsciiOnly

List of usage examples for android.text TextUtils isPrintableAsciiOnly

Introduction

In this page you can find the example usage for android.text TextUtils isPrintableAsciiOnly.

Prototype

@UnsupportedAppUsage
public static boolean isPrintableAsciiOnly(final CharSequence str) 

Source Link

Usage

From source file:android.pim.vcard.VCardUtils.java

public static boolean containsOnlyPrintableAscii(final Collection<String> values) {
    if (values == null) {
        return true;
    }//from   w  w  w. j a v a  2s  .  co m
    for (final String value : values) {
        if (TextUtils.isEmpty(value)) {
            continue;
        }
        if (!TextUtils.isPrintableAsciiOnly(value)) {
            return false;
        }
    }
    return true;
}