Here you can find the source of toUpperCase(String source)
Parameter | Description |
---|---|
source | The source string. |
public static String toUpperCase(String source)
//package com.java2s; /**// ww w. ja v a2 s . c o m * (c) 2008 Cordys R&D B.V. All rights reserved. The computer program(s) is the * proprietary information of Cordys B.V. and provided under the relevant * License Agreement containing restrictions on use and disclosure. Use is * subject to the License Agreement. */ public class Main { /** * This method returns the upper case version of the source string. This method could be used in * a BPM to accommodate the lack of this function in XPath 1.0 * * @param source The source string. * * @return The upper case version of the string. */ public static String toUpperCase(String source) { String returnValue = ""; if (isSet(source)) { returnValue = source.toUpperCase(); } return returnValue; } /** * This method returns whether or not a string is filled. * * @param source The source to check. * * @return true if the string is set. Otherwise false. */ public static boolean isSet(String source) { return (source != null) && (source.trim().length() > 0); } }