Make the drive letter (if any) upper case.
    This is useful because Windows is inconsistent on the case
    of the drive letter, which can cause inconsistencies when
    calculating command signatures.
547323
def updrive(path):
    
    drive, rest = os.path.splitdrive(path)
    if drive:
        path = drive.upper() + rest
    return path
678201
def normcase(self, path):
        """"""
        path = self.filesystem.normcase(path)
        if self.filesystem.is_windows_fs:
            path = path.lower()
        return path
216194
static boolean charEqualsIgnoreCase(char c1, char c2) {
        return c1 == c2 ||
                Character.toUpperCase(c1) == Character.toUpperCase(c2) ||
                Character.toLowerCase(c1) == Character.toLowerCase(c2);
    }
345515
function( str, keepCase ) {
			return str.charAt( 0 ).toUpperCase() + ( keepCase ? str.slice( 1 ) : str.slice( 1 ).toLowerCase() );
		}
634979
def clean(some_string, uppercase=False):
    
    if uppercase:
        return some_string.strip().upper()
    else:
        return some_string.strip().lower()
116108
public static String upperCaseFirst(String str)
  {
    if (str == null || str.equals(EMPTY))
    {
      return str;
    }

    return Character.toUpperCase(str.charAt(0)) + str.substring(1);
  }
352676
def __write_divider(self, top=False, bot=False, nl=True):
        
        if top:
            self.noaa_txt += "\n#"
        if nl:
            self.noaa_txt += "\n"
        self.noaa_txt += "#------------------\n"
        if bot:
            self.noaa_txt += "\n#"
        return
440600
function camelCase(name) {
  return name.charAt(0).toUpperCase() +
    name.slice(1).replace(/-(\w)/g, (m, n) => {
      return n.toUpperCase();
    });
}
1218078
private static char digitToBasic(int digit, boolean uppercase) {
        /*  0..25 map to ASCII a..z or A..Z */
        /* 26..35 map to ASCII 0..9         */
        if(digit<26) {
            if(uppercase) {
                return (char)(CAPITAL_A+digit);
            } else {
                return (char)(SMALL_A+digit);
            }
        } else {
            return (char)((ZERO-26)+digit);
        }
    }
1080974
def _make_one_char_uppercase(string: str) -> str:
        """"""
        if not isinstance(string, str):
            raise TypeError('string must be a string')

        if Aux.lowercase_count(string) > 0:
            while True:
                cindex = randbelow(len(string))
                if string[cindex].islower():
                    aux = list(string)
                    aux[cindex] = aux[cindex].upper()
                    string = ''.join(aux)
                    break

        return string
1211246
public static String makeSafeFilename(String filename) {
        // Replace invalid characters
        for (final Map.Entry<Pattern, String> pair : REPLACEMENT_PAIRS.entrySet()) {
            final Pattern pattern = pair.getKey();
            final Matcher matcher = pattern.matcher(filename);
            filename = matcher.replaceAll(pair.getValue());
        }

        // Make sure the name doesn't violate a Windows reserved word...
        for (Pattern pattern : WINDOWS_INVALID_PATTERNS) {
            if (pattern.matcher(filename).matches()) {
                filename = "uP-" + filename;
                break;
            }
        }

        return filename;
    }
362503
public function caseWordUpper()
    {
        $this->val(mb_convert_case($this->val(), MB_CASE_TITLE, self::DEF_ENCODING));

        return $this;
    }
162368
def on_uppercase(self):
        
        self.uppercase = not self.uppercase
        self.original_layout.set_uppercase(self.uppercase)
        self.special_char_layout.set_uppercase(self.uppercase)
        self.invalidate()
775366
def _expand_authorized_keys_path(path, user, home):
    '''
    
    '''
    converted_path = ''
    had_escape = False
    for char in path:
        if had_escape:
            had_escape = False
            if char == '%':
                converted_path += '%'
            elif char == 'u':
                converted_path += user
            elif char == 'h':
                converted_path += home
            else:
                error = 'AuthorizedKeysFile path: unknown token character "%{0}"'.format(char)
                raise CommandExecutionError(error)
            continue
        elif char == '%':
            had_escape = True
        else:
            converted_path += char
    if had_escape:
        error = "AuthorizedKeysFile path: Last character can't be escape character"
        raise CommandExecutionError(error)
    return converted_path
540010
def uppercase_chars(string: any) -> str:
        """"""
        return ''.join([c if c.isupper() else '' for c in str(string)])
1251277
function applyCase(wordA, wordB) {
	// Exception to avoid words like "I" being converted to "ME"
	if (wordA.length === 1 && wordB.length !== 1) return wordB;
	// Uppercase
	if (wordA === wordA.toUpperCase()) return wordB.toUpperCase();
	// Lowercase
	if (wordA === wordA.toLowerCase()) return wordB.toLowerCase();
	// Capitialized
	var firstChar = wordA.slice(0, 1);
	var otherChars = wordA.slice(1);
	if (firstChar === firstChar.toUpperCase() && otherChars === otherChars.toLowerCase()) {
		return wordB.slice(0, 1).toUpperCase() + wordB.slice(1).toLowerCase();
	}
	// Other cases
	return wordB;
}
888183
public static String toUpperCase(String dn) {
        if (dn == null)
            return null;

        String newDN = null;
        if (dn.indexOf('\u00df') != -1) {
            // convert each character in DN to upper case except '?'(\u00df)
            char[] chars = new char[dn.length()];
            for (int index = 0; index < dn.length(); index++) {
                char c = dn.charAt(index);
                if (c == '\u00df') {
                    chars[index] = c;
                } else {
                    chars[index] = Character.toUpperCase(c);
                }
            }
            newDN = new String(chars);
        } else {
            newDN = dn.toUpperCase();
        }
        return newDN;
    }