summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Treehugger Robot <treehugger-gerrit@google.com> 2018-01-25 02:44:26 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2018-01-25 02:44:26 +0000
commit27bb333e143e6f82774d35e44fcb40a18da91058 (patch)
tree8059fda31919a348682501a2e92356d4eef0c36d
parent7b9a785d6524d0227f9de72e37d8178d9833f238 (diff)
parentb40a26c43d30f475682b59dbbe404bae932b68b0 (diff)
Merge "Adds stripTrailingFs"
-rw-r--r--telephony/java/com/android/internal/telephony/uicc/IccUtils.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/telephony/java/com/android/internal/telephony/uicc/IccUtils.java b/telephony/java/com/android/internal/telephony/uicc/IccUtils.java
index 9f8b3a822c81..c0954385a0a3 100644
--- a/telephony/java/com/android/internal/telephony/uicc/IccUtils.java
+++ b/telephony/java/com/android/internal/telephony/uicc/IccUtils.java
@@ -837,6 +837,13 @@ public class IccUtils {
}
/**
+ * Strip all the trailing 'F' characters of a string, e.g., an ICCID.
+ */
+ public static String stripTrailingFs(String s) {
+ return s == null ? null : s.replaceAll("(?i)f*$", "");
+ }
+
+ /**
* Converts a character of [0-9a-aA-F] to its hex value in a byte. If the character is not a
* hex number, 0 will be returned.
*/