Java String Camel Case To camelCaseToDotNotation(String string)

Here you can find the source of camelCaseToDotNotation(String string)

Description

camel Case To Dot Notation

License

Apache License

Declaration

static String camelCaseToDotNotation(String string) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

public class Main {
    static String camelCaseToDotNotation(String string) {
        StringBuilder sb = new StringBuilder();

        char last = 0;
        for (int i = 0; i < string.length(); i++) {
            char c = string.charAt(i);
            if (Character.isUpperCase(c) && Character.isLowerCase(last)) {
                sb.append(".");
            }/*from www . ja  v a2  s .  com*/
            last = c;
            sb.append(Character.toLowerCase(c));
        }

        return sb.toString();
    }
}

Related

  1. camelCaseSpace(final String str)
  2. camelCaseToDash(String input)
  3. camelCaseToDashes(String camelCaseString, int startIndex, String prefix)
  4. camelCaseToDashLowerName(String name)
  5. camelCaseToDashSeperated(String s)
  6. camelCaseToEnum(String camelCase)
  7. camelCaseToEnum(String name)
  8. camelCaseToHuman(String input)
  9. camelCaseToPhrase(String camelCase)