diff options
author | Elliott Hughes <enh@google.com> | 2010-03-02 16:01:12 -0800 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2010-03-02 16:01:12 -0800 |
commit | ae5b3915df3b8acc0658e8f1653ac4af5ac7b564 (patch) | |
tree | b5cfcfe7a9b9a51974d5e9712fb88ee9c3bc0bd0 /luni | |
parent | 9a4143ff0e19ae3eebadc3d917537352f3706285 (diff) | |
parent | 31df07d33bf4730c76d5f11b802e8e2bd40baba9 (diff) | |
download | libcore-ae5b3915df3b8acc0658e8f1653ac4af5ac7b564.zip libcore-ae5b3915df3b8acc0658e8f1653ac4af5ac7b564.tar.gz libcore-ae5b3915df3b8acc0658e8f1653ac4af5ac7b564.tar.bz2 |
Merge "Add (but @hide) String.isEmpty and Locale.ROOT." into dalvik-dev
Diffstat (limited to 'luni')
-rw-r--r-- | luni/src/main/java/java/lang/String.java | 10 | ||||
-rw-r--r-- | luni/src/main/java/java/util/Locale.java | 9 |
2 files changed, 19 insertions, 0 deletions
diff --git a/luni/src/main/java/java/lang/String.java b/luni/src/main/java/java/lang/String.java index 1556389..eb9b17b 100644 --- a/luni/src/main/java/java/lang/String.java +++ b/luni/src/main/java/java/lang/String.java @@ -1202,6 +1202,16 @@ public final class String implements Serializable, Comparable<String>, native public String intern(); /** + * Returns true if the length of this string is 0. + * + * @since 1.6 + * @hide + */ + public boolean isEmpty() { + return count == 0; + } + + /** * Searches in this string for the last index of the specified character. * The search for the character starts at the end and moves towards the * beginning of this string. diff --git a/luni/src/main/java/java/util/Locale.java b/luni/src/main/java/java/util/Locale.java index ec36fcf..9b35a0f 100644 --- a/luni/src/main/java/java/util/Locale.java +++ b/luni/src/main/java/java/util/Locale.java @@ -157,6 +157,15 @@ public final class Locale implements Cloneable, Serializable { public static final Locale PRC = new Locale("zh", "CN"); //$NON-NLS-1$//$NON-NLS-2$ /** + * Locale constant for the root locale. The root locale has an empty language, + * country, and variant. + * + * @since 1.6 + * @hide + */ + public static final Locale ROOT = new Locale("", "", ""); + + /** * Locale constant for zh_CN. */ public static final Locale SIMPLIFIED_CHINESE = new Locale("zh", "CN"); //$NON-NLS-1$//$NON-NLS-2$ |