private static int scriptNameToCode ( String name ) { try { int [ ] codes = UScript . getCode ( name ) ; return codes != null ? codes [ 0 ] : UScript . INVALID_CODE ; } catch ( MissingResourceException e ) { ///CLOVER:OFF return UScript . INVALID_CODE ; ///CLOVER:ON } }
Return the script code for a given name or UScript . INVALID_CODE if not found .