summaryrefslogtreecommitdiffstats
path: root/luni
diff options
context:
space:
mode:
Diffstat (limited to 'luni')
-rw-r--r--luni/src/main/java/java/lang/String.java10
-rw-r--r--luni/src/main/java/java/util/Locale.java9
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$