Java String Upper Case toUpperCase(String candidate)

Here you can find the source of toUpperCase(String candidate)

Description

Wraps to UpperCase first char in candidate

License

Apache License

Parameter

Parameter Description
candidate a parameter

Return

candidate

Declaration

public static String toUpperCase(String candidate) 

Method Source Code

//package com.java2s;
// Licensed under the Apache License, Version 2.0 (the "License");

public class Main {
    /**//from  w w w .j a v a 2 s. co m
     * Wraps to UpperCase first char in candidate
     * 
     * @param candidate
     * 
     * @return candidate
     */
    public static String toUpperCase(String candidate) {
        if (candidate.length() >= 1)
            return Character.toUpperCase(candidate.charAt(0)) + candidate.substring(1);
        return candidate;
    }
}

Related

  1. toUpperCase(final char c)
  2. toUpperCase(final String s)
  3. toUpperCase(final String s)
  4. toUpperCase(final String s)
  5. toUpperCase(final StringBuilder src)
  6. toUpperCase(String from)
  7. toUpperCase(String in)
  8. toUpperCase(String input)
  9. toUpperCase(String pString)