commit | 76e05493b4041d971dd23773e21ecdc527c46e5c | [log] [tgz] |
---|---|---|
author | Jun Yin <junyin@google.com> | Thu Jan 25 03:34:13 2018 +0000 |
committer | android-build-merger <android-build-merger@google.com> | Thu Jan 25 03:34:13 2018 +0000 |
tree | 6cde8f32fef5e5ef0efd44d5fff3e2dff0169692 | |
parent | fd8df8236ff057169c16ff584261a766e4b6f8d7 [diff] | |
parent | a91491a3b8fc0f355d5fe9a69c4efefcba75508f [diff] |
Merge "Adds stripTrailingFs" am: 27bb333e14 am: a91491a3b8 Change-Id: I6b850d252fb40395bc312f4ed8be383153af52ef
diff --git a/telephony/java/com/android/internal/telephony/uicc/IccUtils.java b/telephony/java/com/android/internal/telephony/uicc/IccUtils.java index 9f8b3a8..c095438 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 @@ } /** + * 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. */