Class CaseMap.Upper

    • Constructor Detail

      • Upper

        private Upper​(int opt)
    • Method Detail

      • omitUnchangedText

        public CaseMap.Upper omitUnchangedText()
        Returns an instance that behaves like this one but omits unchanged text when case-mapping with Edits.
        Specified by:
        omitUnchangedText in class CaseMap
        Returns:
        an options object with this option.
      • apply

        public java.lang.String apply​(java.util.Locale locale,
                                      java.lang.CharSequence src)
        Uppercases a string. Casing is locale-dependent and context-sensitive. The result may be longer or shorter than the original.
        Parameters:
        locale - The locale ID. Can be null for Locale.getDefault(). (See ULocale.toLocale().)
        src - The original string.
        Returns:
        the result string.
        See Also:
        UCharacter.toUpperCase(Locale, String)
      • apply

        public <A extends java.lang.Appendable> A apply​(java.util.Locale locale,
                                                        java.lang.CharSequence src,
                                                        A dest,
                                                        Edits edits)
        Uppercases a string and optionally records edits (see omitUnchangedText()). Casing is locale-dependent and context-sensitive. The result may be longer or shorter than the original.
        Parameters:
        locale - The locale ID. Can be null for Locale.getDefault(). (See ULocale.toLocale().)
        src - The original string.
        dest - A buffer for the result string. Must not be null.
        edits - Records edits for index mapping, working with styled text, and getting only changes (if any). This function calls edits.reset() first. edits can be null.
        Returns:
        dest with the result string (or only changes) appended.
        See Also:
        UCharacter.toUpperCase(Locale, String)