当前位置: 首页>>代码示例>>Java>>正文


Java UCharacter.toUpperCase方法代码示例

本文整理汇总了Java中com.ibm.icu.lang.UCharacter.toUpperCase方法的典型用法代码示例。如果您正苦于以下问题:Java UCharacter.toUpperCase方法的具体用法?Java UCharacter.toUpperCase怎么用?Java UCharacter.toUpperCase使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.ibm.icu.lang.UCharacter的用法示例。


在下文中一共展示了UCharacter.toUpperCase方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: transform

import com.ibm.icu.lang.UCharacter; //导入方法依赖的package包/类
public String transform(final String value) {
    if (value == null) {
        return null;
    }

    switch (mode) {
    case UPPER_CASE:
        return UCharacter.toUpperCase(value);
    case LOWER_CASE:
        return UCharacter.toLowerCase(value);
    case CAPITALIZE_SENTENCES:
        return UCharacter.toTitleCase(value, BreakIterator.getSentenceInstance());
    case CAPITALIZE_WORDS:
        return capitalizeWordsByDictionaries(value);
    default:
        throw new UnsupportedOperationException("Unsupported mode: " + mode);
    }
}
 
开发者ID:datacleaner,项目名称:DataCleaner,代码行数:19,代码来源:TextCaseTransformer.java

示例2: addSourceTargetSet

import com.ibm.icu.lang.UCharacter; //导入方法依赖的package包/类
@Override
public void addSourceTargetSet(UnicodeSet inputFilter, UnicodeSet sourceSet, UnicodeSet targetSet) {
    synchronized (this) {
        if (sourceTargetUtility == null) {
            sourceTargetUtility = new SourceTargetUtility(new Transform<String,String>() {
                @Override
                public String transform(String source) {
                    return UCharacter.toUpperCase(locale, source);
                }
            });
        }
    }
    sourceTargetUtility.addSourceTargetSet(this, inputFilter, sourceSet, targetSet);
}
 
开发者ID:abhijitvalluri,项目名称:fitnotifications,代码行数:15,代码来源:UppercaseTransliterator.java

示例3: handleCase

import com.ibm.icu.lang.UCharacter; //导入方法依赖的package包/类
/**
 * @param val
 *            string to be handled
 * @param option
 *            to upper case or to lower case
 * @return
 */
private String handleCase( String val, char option, ULocale locale )
{
	if ( option == '<' )
		return UCharacter.toLowerCase( locale, val );
	else if ( option == '>' )
		return UCharacter.toUpperCase( locale, val );
	else
		return val;

}
 
开发者ID:eclipse,项目名称:birt,代码行数:18,代码来源:StringFormatSpecifierImpl.java

示例4: handleCase

import com.ibm.icu.lang.UCharacter; //导入方法依赖的package包/类
/**
 * @param val
 *            string to be handled
 * @param option
 *            to upper case or to lower case
 * @return
 */
private String handleCase( String val, char option )
{
	if ( option == '<' )
		return UCharacter.toLowerCase( locale, val );
	else if ( option == '>' )
		return UCharacter.toUpperCase( locale, val );
	else
		return val;

}
 
开发者ID:eclipse,项目名称:birt,代码行数:18,代码来源:StringFormatter.java

示例5: toUpperCase

import com.ibm.icu.lang.UCharacter; //导入方法依赖的package包/类
/**
 * Converts the characters in this string to uppercase, using the specified
 * Locale.
 * 
 * @param locale
 *            the Locale to use.
 * @return a new string containing the uppercase characters equivalent to
 *         the characters in this string.
 */
public String toUpperCase(Locale locale) {
    String result = UCharacter.toUpperCase(locale, this);

    // Must return self if chars unchanged
    if (count != result.count) {
        return result;
    }
    for (int i = 0; i < count; i++) {
        if (value[offset + i] != result.value[result.offset + i]) {
            return result;
        }
    }
    return this;
}
 
开发者ID:freeVM,项目名称:freeVM,代码行数:24,代码来源:String.java

示例6: normalize

import com.ibm.icu.lang.UCharacter; //导入方法依赖的package包/类
@Override
public String normalize(final String input) {
  return UCharacter.toUpperCase(locale().asIcuLocale(), input);
}
 
开发者ID:BBN-E,项目名称:bue-common-open,代码行数:5,代码来源:StringNormalizers.java

示例7: toUpperCase

import com.ibm.icu.lang.UCharacter; //导入方法依赖的package包/类
/**
 * Returns the upper case equivalent for the specified code point if the
 * code point is a lower case letter. Otherwise, the specified code point is
 * returned unchanged.
 * 
 * @param codePoint
 *            the code point to convert.
 * @return if {@code codePoint} is a lower case character then its upper
 *         case counterpart, otherwise just {@code codePoint}.
 */
public static int toUpperCase(int codePoint) {
    return UCharacter.toUpperCase(codePoint);
}
 
开发者ID:shannah,项目名称:cn1,代码行数:14,代码来源:Character.java

示例8: toUpperCase

import com.ibm.icu.lang.UCharacter; //导入方法依赖的package包/类
/**
 * Answers the upper case equivalent for the character when the character is
 * a lower case letter, otherwise answers the character.
 * 
 * @param codePoint
 *            the character, including supplementary characters
 * @return if codePoint is not an upper case character then its upper case
 *         counterpart, otherwise just codePoint
 */
public static int toUpperCase(int codePoint) {
    return UCharacter.toUpperCase(codePoint);
}
 
开发者ID:freeVM,项目名称:freeVM,代码行数:13,代码来源:Character.java


注:本文中的com.ibm.icu.lang.UCharacter.toUpperCase方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。