String (@NotNull String prefix, boolean upperCaseStyle, String @NotNull [] words, int wordCount, @NotNull String startWord, char c, boolean isArray, boolean skip_) { StringBuilder buffer = new StringBuilder(); buffer.append(prefix); if (upperCaseStyle) { startWord = Strings.toUpperCase(startWord); } else { if (prefix.isEmpty() || Strings.endsWithChar(prefix, '_')) { startWord = Strings.toLowerCase(startWord); } else { startWord = Character.toUpperCase(c) + startWord.substring(1); } } buffer.append(startWord); for (int i = words.length - wordCount + 1; i < words.length; i++) { String word = words[i]; String prevWord = words[i - 1]; if (upperCaseStyle) { word = Strings.toUpperCase(word); if (prevWord.charAt(prevWord.length() - 1) != '_' && word.charAt(0) != '_') { word = "_" + word; } } else { if (prevWord.charAt(prevWord.length() - 1) == '_') { word = Strings.toLowerCase(word); } if (skip_) { if (word.equals("_")) continue; if (prevWord.equals("_")) { word = Strings.capitalize(word); } } } buffer.append(word); } String suggestion = buffer.toString(); if (isArray) { suggestion = Strings.pluralize(suggestion); if (upperCaseStyle) { suggestion = Strings.toUpperCase(suggestion); } } return suggestion; }