Java Code Examples for org.apache.commons.lang3.StringUtils#swapCase()

The following examples show how to use org.apache.commons.lang3.StringUtils#swapCase() . These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source Project: SkaETL   File: SwapCaseTransformator.java    License: Apache License 2.0 5 votes vote down vote up
@Override
public void apply(String idProcess, ParameterTransformation parameterTransformation, ObjectNode jsonValue) {
    if (has(parameterTransformation.getKeyField(), jsonValue)) {
        JsonNode valueField = at(parameterTransformation.getKeyField(), jsonValue);
        String capitalized = StringUtils.swapCase(valueField.textValue());
        put(jsonValue, parameterTransformation.getKeyField(), capitalized);
    }
}
 
Example 2
Source Project: vscrawler   File: SwapCase.java    License: Apache License 2.0 4 votes vote down vote up
@Override
protected String handleSingleStr(String input) {
    return StringUtils.swapCase(input);
}
 
Example 3
Source Project: tutorials   File: StringUtilsUnitTest.java    License: MIT License 4 votes vote down vote up
@Test
public void givenString_whenSwappingCase_thenCorrect() {
    String originalString = "baeldung.COM";
    String swappedString = StringUtils.swapCase(originalString);
    assertEquals("BAELDUNG.com", swappedString);
}