Merge "Adds stripTrailingFs"
This commit is contained in:
@@ -836,6 +836,13 @@ public class IccUtils {
|
|||||||
return new String(new char[] {HEX_CHARS[(b & 0xFF) >>> 4], HEX_CHARS[b & 0xF]});
|
return new String(new char[] {HEX_CHARS[(b & 0xFF) >>> 4], HEX_CHARS[b & 0xF]});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 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
|
* 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.
|
* hex number, 0 will be returned.
|
||||||
|
|||||||
Reference in New Issue
Block a user