當前位置: 首頁>>代碼示例>>Java>>正文


Java BreakIterator.getCharacterInstance方法代碼示例

本文整理匯總了Java中java.text.BreakIterator.getCharacterInstance方法的典型用法代碼示例。如果您正苦於以下問題:Java BreakIterator.getCharacterInstance方法的具體用法?Java BreakIterator.getCharacterInstance怎麽用?Java BreakIterator.getCharacterInstance使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在java.text.BreakIterator的用法示例。


在下文中一共展示了BreakIterator.getCharacterInstance方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: BreakIteratorTest

import java.text.BreakIterator; //導入方法依賴的package包/類
public BreakIteratorTest()
{
    characterBreak = BreakIterator.getCharacterInstance();
    wordBreak = BreakIterator.getWordInstance();
    lineBreak = BreakIterator.getLineInstance();
    sentenceBreak = BreakIterator.getSentenceInstance();
}
 
開發者ID:AdoptOpenJDK,項目名稱:openjdk-jdk10,代碼行數:8,代碼來源:BreakIteratorTest.java

示例2: TestCharacterInvariants

import java.text.BreakIterator; //導入方法依賴的package包/類
public void TestCharacterInvariants()
{
    BreakIterator e = BreakIterator.getCharacterInstance();
    doBreakInvariantTest(e, cannedTestChars + "\u1100\u1101\u1102\u1160\u1161\u1162\u11a8"
        + "\u11a9\u11aa");
    doOtherInvariantTest(e, cannedTestChars + "\u1100\u1101\u1102\u1160\u1161\u1162\u11a8"
        + "\u11a9\u11aa");
}
 
開發者ID:AdoptOpenJDK,項目名稱:openjdk-jdk10,代碼行數:9,代碼來源:BreakIteratorTest.java

示例3: wrapStringToArray

import java.text.BreakIterator; //導入方法依賴的package包/類
/** Wrap multi-line strings (and get the individual lines).
* @param original  the original string to wrap
* @param width     the maximum width of lines
* @param wrapWords if <code>true</code>, the lines are wrapped on word boundaries (if possible);
*                  if <code>false</code>, character boundaries are used
* @param removeNewLines if <code>true</code>, any newlines in the original string are ignored
* @return the lines after wrapping
* @deprecated use {@link #wrapStringToArray(String, int, BreakIterator, boolean)} since it is better for I18N
*/
@Deprecated
public static String[] wrapStringToArray(String original, int width, boolean wrapWords, boolean removeNewLines) {
    BreakIterator bi = (wrapWords ? BreakIterator.getWordInstance() : BreakIterator.getCharacterInstance());

    return wrapStringToArray(original, width, bi, removeNewLines);
}
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:16,代碼來源:Utilities.java


注:本文中的java.text.BreakIterator.getCharacterInstance方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。