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

com.starksign.utils.Case Maven / Gradle / Ivy

Go to download

Welcome to the Stark Sign Java SDK! This tool is made for Java developers who want to easily integrate with our API. This SDK version is compatible with the Stark Sign API v2.

The newest version!
package com.starksign.utils;

final class Case {
    public static String camelToKebab(String text) {
        if (text == null) {
            return null;
        }

        StringBuilder decamelized = new StringBuilder(text.length() + 10);
        for (int i = 0; i < text.length(); i++) {
            if (Character.isUpperCase(text.charAt(i)) && decamelized.length() > 0) {
                decamelized.append("-");
            }
            decamelized.append(Character.toLowerCase(text.charAt(i)));
        }
        return decamelized.toString();
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy