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


Java UCharacter.toLowerCase方法代码示例

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


在下文中一共展示了UCharacter.toLowerCase方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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.toLowerCase(locale, source);
                }
            });
        }
    }
    sourceTargetUtility.addSourceTargetSet(this, inputFilter, sourceSet, targetSet);
}
 
开发者ID:abhijitvalluri,项目名称:fitnotifications,代码行数:15,代码来源:LowercaseTransliterator.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: toLowerCase

import com.ibm.icu.lang.UCharacter; //导入方法依赖的package包/类
/**
 * Converts the characters in this string to lowercase, using the specified
 * Locale.
 * 
 * @param locale
 *            the Locale to use.
 * @return a new string containing the lowercase characters equivalent to
 *         the characters in this string.
 */
public String toLowerCase(Locale locale) {
    String result = UCharacter.toLowerCase(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: parsePattern

import com.ibm.icu.lang.UCharacter; //导入方法依赖的package包/类
/**
 * Parse a pattern string starting at offset pos.  Keywords are
 * matched case-insensitively.  Spaces may be skipped and may be
 * optional or required.  Integer values may be parsed, and if
 * they are, they will be returned in the given array.  If
 * successful, the offset of the next non-space character is
 * returned.  On failure, -1 is returned.
 * @param pattern must only contain lowercase characters, which
 * will match their uppercase equivalents as well.  A space
 * character matches one or more required spaces.  A '~' character
 * matches zero or more optional spaces.  A '#' character matches
 * an integer and stores it in parsedInts, which the caller must
 * ensure has enough capacity.
 * @param parsedInts array to receive parsed integers.  Caller
 * must ensure that parsedInts.length is >= the number of '#'
 * signs in 'pattern'.
 * @return the position after the last character parsed, or -1 if
 * the parse failed
 */
@SuppressWarnings("fallthrough")
public static int parsePattern(String rule, int pos, int limit,
        String pattern, int[] parsedInts) {
    // TODO Update this to handle surrogates
    int[] p = new int[1];
    int intCount = 0; // number of integers parsed
    for (int i=0; i<pattern.length(); ++i) {
        char cpat = pattern.charAt(i);
        char c;
        switch (cpat) {
        case ' ':
            if (pos >= limit) {
                return -1;
            }
            c = rule.charAt(pos++);
            if (!PatternProps.isWhiteSpace(c)) {
                return -1;
            }
            // FALL THROUGH to skipWhitespace
        case '~':
            pos = PatternProps.skipWhiteSpace(rule, pos);
            break;
        case '#':
            p[0] = pos;
            parsedInts[intCount++] = parseInteger(rule, p, limit);
            if (p[0] == pos) {
                // Syntax error; failed to parse integer
                return -1;
            }
            pos = p[0];
            break;
        default:
            if (pos >= limit) {
                return -1;
            }
            c = (char) UCharacter.toLowerCase(rule.charAt(pos++));
            if (c != cpat) {
                return -1;
            }
            break;
        }
    }
    return pos;
}
 
开发者ID:abhijitvalluri,项目名称:fitnotifications,代码行数:64,代码来源:Utility.java

示例7: normalize

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

示例8: toLowerCase

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

示例9: toLowerCase

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


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