Return all (and only) the uppercase chars in the given string.
540010
def uppercase_chars(string: any) -> str:
        """"""
        return ''.join([c if c.isupper() else '' for c in str(string)])
972192
def make_all_uppercase(
            lst: Union[list, tuple, str, set]
    ) -> Union[list, tuple, str, set]:
        
        if not isinstance(lst, (list, tuple, str, set)):
            raise TypeError('lst must be a list, a tuple, a set or a string')

        if isinstance(lst, str):
            return lst.upper()

        arr = list(lst)

        # enumerate is 70% slower than range
        # for i in range(len(lst)):
        #     if isinstance(arr[i], (list, tuple, str, set)):
        #         arr[i] = Aux.make_all_uppercase(arr[i])
        arr[:] = [
            Aux.make_all_uppercase(element) if (
                isinstance(element, (list, tuple, str, set))
            ) else element for element in arr
        ]

        if isinstance(lst, set):
            return set(arr)
        elif isinstance(lst, tuple):
            return tuple(arr)

        return arr
1316039
public static String getWithFirstUpperCase(String string) {
        if (string == null) {
            return "";
        }

        if (string.length() == 1) {
            return string.substring(0, 1).toUpperCase();
        }

        return string.substring(0, 1).toUpperCase() + string.substring(1);
    }
525199
public static String toLowerCase(String string) {
    int length = string.length();
    for (int i = 0; i < length; i++) {
      if (isUpperCase(string.charAt(i))) {
        char[] chars = string.toCharArray();
        for (; i < length; i++) {
          char c = chars[i];
          if (isUpperCase(c)) {
            chars[i] = (char) (c ^ 0x20);
          }
        }
        return String.valueOf(chars);
      }
    }
    return string;
  }
557331
public static String upcase(final String aString) {
        return aString.substring(0, 1).toUpperCase(Locale.getDefault()) + aString.substring(1);
    }
619793
function getCap(str) {
            const firstChar = str.charAt(0);

            const firstCharLower = firstChar.toLowerCase();
            const firstCharUpper = firstChar.toUpperCase();

            if (firstCharLower === firstCharUpper) {

                // char has no uppercase variant, so it's non-alphabetic
                return "non-alpha";
            }
            if (firstChar === firstCharLower) {
                return "lower";
            }
            return "upper";

        }
176030
public static String upperCaseInternal(String s) {
        if (isNullOrEmpty(s)) {
            return s;
        }
        return s.toUpperCase(LOCALE_INTERNAL);
    }
1287949
def to_mixed_case(s):
    
    out = ''
    last_c = ''
    for c in s:
        if c == '_':
            pass
        elif last_c in ('', '_'):
            out += c.upper()
        else:
            out += c.lower()
        last_c = c
    return out
1351278
public static function toCamelCase(string $string): string
    {
        $words = self::_prepStringForCasing($string);

        if (empty($words)) {
            return '';
        }

        $string = array_shift($words) . implode('', array_map([
                static::class,
                'upperCaseFirst'
            ], $words));

        return $string;
    }
997712
public function toUpperCamelCase($string)
  {
      $string = str_replace(array('-', '_'), ' ', $string);
      $string = ucwords(strtolower($string));
      $string = str_replace(' ', '', $string);

      return $string;
  }
528116
private static String upperCaseFirstChar(String s) {
        return Character.toUpperCase(s.charAt(0)) + s.substring(1);
    }
634979
def clean(some_string, uppercase=False):
    
    if uppercase:
        return some_string.strip().upper()
    else:
        return some_string.strip().lower()
638905
public static String toUpperCaseWithUnderscore(final String str) {
        if (N.isNullOrEmpty(str)) {
            return str;
        }

        String result = upperCaseWithUnderscorePropNamePool.get(str);

        if (result == null) {
            result = StringUtil.toUpperCaseWithUnderscore(str);
            upperCaseWithUnderscorePropNamePool.put(str, result);
        }

        return result;
    }
797334
def match(self, chars):
        """"""
        start_index = self.next_index
        for char in self:
            if char not in chars:
                self.next_index -= 1
                break
        return self[start_index:self.next_index]
29837
private static boolean isNameCase(String str) {
    if (str.length() < 2) {
      return false;
    }
    if (!(Character.isUpperCase(str.charAt(0)) || Character.isTitleCase(str.charAt(0)))) {
      return false;
    }
    for (int i = 1; i < str.length(); i++) {
      if (Character.isUpperCase(str.charAt(i))) {
        return false;
      }
    }
    return true;
  }
368
def preprocess(string):
    
    string = unicode(string, encoding="utf-8")
    # convert diacritics to simpler forms
    string = regex1.sub(lambda x: accents[x.group()], string)
    # remove all rest of the unwanted characters
    return regex2.sub('', string).encode('utf-8')
1317062
public static boolean startsWithUppercase(String str) {
    if (isEmpty(str)) {
      return false;
    }
    return Character.isUpperCase(str.charAt(0));
  }