List of usage examples for java.util Locale ENGLISH
Locale ENGLISH
To view the source code for java.util Locale ENGLISH.
Click Source Link
From source file:hu.sztaki.incremental.ml.streaming.imsr.MatrixVectorPairSource.java
private static Scanner initCsvScanner(Scanner s) { s.useLocale(Locale.ENGLISH); s.useDelimiter("(\\s+|\\s*,\\s*)"); return s; }
From source file:com.trenako.utility.Slug.java
/** * Encodes the provided String as {@code slug}. * * @param input the String to be encoded * @return the slug/*w ww.j ava 2 s .c o m*/ */ public static String encode(String input) { Assert.notNull(input, "The input string must be not null"); String nowhitespace = WHITESPACE.matcher(input).replaceAll("-"); String normalized = Normalizer.normalize(nowhitespace, Form.NFD); String slug = NONLATIN.matcher(normalized).replaceAll(""); return slug.toLowerCase(Locale.ENGLISH); }
From source file:Main.java
/** * Detects common bzip2 suffixes in the given filename. * * @param filename name of a file/*from ww w. ja v a2 s. c o m*/ * @return <code>true</code> if the filename has a common bzip2 suffix, * <code>false</code> otherwise */ public static boolean isCompressedFilename(String filename) { String lower = filename.toLowerCase(Locale.ENGLISH); int n = lower.length(); // Shortest suffix is three letters (.bz), longest is five (.tbz2) for (int i = 3; i <= 5 && i < n; i++) { if (uncompressSuffix.containsKey(lower.substring(n - i))) { return true; } } return false; }
From source file:com.hack23.cia.service.data.impl.LegacyNamingStrategy.java
/** * Convert.//w w w. j av a2s . c o m * * @param identifier * the identifier * @return the identifier */ private static Identifier convert(final Identifier identifier) { if (identifier == null || StringUtils.isBlank(identifier.getText())) { return identifier; } else { return Identifier.toIdentifier( identifier.getText().replaceAll(REG_EXPR, REPLACEMENT_PATTERN).toLowerCase(Locale.ENGLISH)); } }
From source file:com.fmguler.ven.LiquibaseUtil.java
/** * Build the test database//from w w w .j a v a 2s. co m */ public static void buildDatabase() { try { Locale currLocale = Locale.getDefault(); Locale.setDefault(Locale.ENGLISH); Database database = DatabaseFactory.getInstance() .findCorrectDatabaseImplementation(getDataSource().getConnection()); Liquibase liquibase = new Liquibase("etc/test-db/test-db-changelog.xml", new FileSystemFileOpener(), database); liquibase.update(""); Locale.setDefault(currLocale); } catch (SQLException ex) { ex.printStackTrace(); } catch (JDBCException ex) { ex.printStackTrace(); } catch (LiquibaseException ex) { ex.printStackTrace(); } }
From source file:examples.mail.POP3Mail.java
public static final void printMessageInfo(BufferedReader reader, int id) throws IOException { String from = ""; String subject = ""; String line;/*from ww w. ja v a 2 s . c om*/ while ((line = reader.readLine()) != null) { String lower = line.toLowerCase(Locale.ENGLISH); if (lower.startsWith("from: ")) { from = line.substring(6).trim(); } else if (lower.startsWith("subject: ")) { subject = line.substring(9).trim(); } } System.out.println(Integer.toString(id) + " From: " + from + " Subject: " + subject); }
From source file:com.xiangzhurui.util.email.POP3Mail.java
public static final void printMessageInfo(BufferedReader reader, int id) throws IOException { String from = ""; String subject = ""; String line;//from w w w . j a v a 2 s. c om while ((line = reader.readLine()) != null) { String lower = line.toLowerCase(Locale.ENGLISH); if (lower.startsWith("from: ")) { from = line.substring(6).trim(); } else if (lower.startsWith("subject: ")) { subject = line.substring(9).trim(); } } System.out.println(id + " From: " + from + " Subject: " + subject); }
From source file:be.ceau.chart.enums.TitlePosition.java
private TitlePosition() { this.serialized = name().toLowerCase(Locale.ENGLISH); }
From source file:be.ceau.chart.enums.BorderSkipped.java
private BorderSkipped() { this.serialized = name().toLowerCase(Locale.ENGLISH); }
From source file:be.ceau.chart.enums.ScalesPosition.java
private ScalesPosition() { this.serialized = name().toLowerCase(Locale.ENGLISH); }