All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.robe.common.utils.StringsOperations Maven / Gradle / Ivy

There is a newer version: 0.5.0.0-1039
Show newest version
package io.robe.common.utils;

/**
 * Provides frequently needed methods for string operations.
 */
public final class StringsOperations {
    private StringsOperations() {

    }

    /**
     * Capitalizes the first character of the word given.
     * It will convert i to I
     *
     * @param word
     * @return result
     */
    public static final String capitalizeFirstChar(String word) {
        return Character.toUpperCase(word.charAt(0)) + word.substring(1);
    }

    /**
     * Un capitalizes the first character of the word given.
     * It will convert i to I
     *
     * @param word
     * @return result
     */
    public static final String unCapitalizeFirstChar(String word) {
        return Character.toLowerCase(word.charAt(0)) + word.substring(1);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy