cucumber.runtime.snippets.UnderscoreConcatenator Maven / Gradle / Ivy
package cucumber.runtime.snippets;
public class UnderscoreConcatenator implements Concatenator {
@Override
public String concatenate(String[] words) {
StringBuilder functionName = new StringBuilder();
boolean firstWord = true;
for (String word : words) {
if (firstWord) {
word = word.toLowerCase();
} else {
functionName.append('_');
}
functionName.append(word);
firstWord = false;
}
return functionName.toString();
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy