Upper first letter
168805
function(string){
				var pattern = /(^|\W)(\w)(\w*)/g,
					result = [],
					match;
				
				while (pattern.exec(string)) {
					result.push(RegExp.$1 + RegExp.$2.toUpperCase() + RegExp.$3);
				}
				
				return result.join('');
			}
244571
def _get_id2upper(id2upper, item_id, item_obj):
    """"""
    if item_id in id2upper:
        return id2upper[item_id]
    upper_ids = set()
    for upper_obj in item_obj.get_goterms_upper():
        upper_id = upper_obj.item_id
        upper_ids.add(upper_id)
        upper_ids |= _get_id2upper(id2upper, upper_id, upper_obj)
    id2upper[item_id] = upper_ids
    return upper_ids
511743
public function upperCaseWords()
    {
        return $this->cloneInstance(
            function (StringObject $new) {
                $new->string = Mbstring::ucwords($new->string, $this->encoding);
            }
        );
    }
1010840
public static String capitalizeFirst( String s )
    {
        if (StringUtil.isEmpty( s )) return s;

        StringBuilder sb = new StringBuilder();
        sb.append( s.substring( 0, 1 ).toUpperCase() );
        sb.append( s.substring( 1 ) );
        return sb.toString();
    }
987684
private boolean startsWithIgnoreCase(String str1, String str2) {
        return str1 != null && str2 != null && str1.toUpperCase().startsWith(str2.toUpperCase());
    }
291553
public static String upperCaseFirstChar(String _str) {
        if (_str == null) {
            return null;
        }
        if (_str.isEmpty()) {
            return _str;
        }
        return _str.substring(0, 1).toUpperCase() + _str.substring(1);
    }
914120
def _camel_case(cls, text, first_upper=False):
        
        result = ''
        need_upper = False
        for pos, symbol in enumerate(text):
            if symbol == '_' and pos > 0:
                need_upper = True
            else:
                if need_upper:
                    result += symbol.upper()
                else:
                    result += symbol.lower()
                need_upper = False
        if first_upper:
            result = result[0].upper() + result[1:]
        return result
346668
String upcaseFirst(String name)
   {
      StringBuilder sb = new StringBuilder();
      sb.append(name.substring(0, 1).toUpperCase(Locale.ENGLISH));
      sb.append(name.substring(1));
      return sb.toString();
   }
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);
    }
256770
public function upperCaseFirst()
    {
        return $this->cloneInstance(
            function (StringObject $new) {
                $new->string = Mbstring::ucfirst($new->string, $this->encoding);
            }
        );
    }
1291344
@Nullable
  public static String uppercaseFirstChar(String str, Language language) {
    if (language != null && "nl".equals(language.getShortCode()) && str != null && str.toLowerCase().startsWith("ij")) {
      // hack to fix https://github.com/languagetool-org/languagetool/issues/148
      return "IJ" + str.substring(2);
    } else {
      return changeFirstCharCase(str, true);
    }
  }
176030
public static String upperCaseInternal(String s) {
        if (isNullOrEmpty(s)) {
            return s;
        }
        return s.toUpperCase(LOCALE_INTERNAL);
    }
1130387
public static function camelCase(string $name, bool $upperFirst = false): string
    {
        $name = \trim($name, '-_');

        // convert 'first-second' to 'firstSecond'
        if (\strpos($name, '-')) {
            $name = \ucwords(\str_replace('-', ' ', $name));
            $name = \str_replace(' ', '', \lcfirst($name));
        }

        return $upperFirst ? \ucfirst($name) : $name;
    }
474739
def _capitalize_first_letter(word):
    
    if word[0].isalpha():
        # These two cases are necessary in order to get a regex pattern
        # starting with '[xX]' and not '[Xx]'. This allows to check for
        # colliding regex afterwards.
        if word[0].isupper():
            return "[" + word[0].swapcase() + word[0] + "]" + word[1:]
        else:
            return "[" + word[0] + word[0].swapcase() + "]" + word[1:]
    return word
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";

        }
195832
@Override
    public ZMatrixRMaj getUpper(ZMatrixRMaj upper )
    {
        int numRows = LU.numRows < LU.numCols ? LU.numRows : LU.numCols;
        int numCols = LU.numCols;

        upper = UtilDecompositons_ZDRM.checkZerosLT(upper, numRows,numCols);

        for( int i = 0; i < numRows; i++ ) {
            for( int j = i; j < numCols; j++ ) {
                int indexLU = LU.getIndex(i,j);
                int indexU = upper.getIndex(i,j);

                double real = LU.data[indexLU];
                double imaginary = LU.data[indexLU+1];

                upper.data[indexU] = real;
                upper.data[indexU+1] = imaginary;
            }
        }

        return upper;
    }
648577
def capfirst(x):
    '''
    '''
    x = to_string(x).strip()
    if x:
        return x[0].upper() + x[1:].lower()
    else:
        return x