Example usage for org.apache.commons.lang3 StringUtils appendIfMissingIgnoreCase

List of usage examples for org.apache.commons.lang3 StringUtils appendIfMissingIgnoreCase

Introduction

In this page you can find the example usage for org.apache.commons.lang3 StringUtils appendIfMissingIgnoreCase.

Prototype

public static String appendIfMissingIgnoreCase(final String str, final CharSequence suffix,
        final CharSequence... suffixes) 

Source Link

Document

Appends the suffix to the end of the string if the string does not already end, case insensitive, with any of the suffixes.

Usage

From source file:kenh.expl.functions.AppendIfMissing.java

public String process(String str, String suffix, String[] suffixes, boolean ignoreCase) {
    if (ignoreCase)
        return StringUtils.appendIfMissingIgnoreCase(str, suffix, suffixes);
    else/*from   w ww  .  ja v a2 s .c  o m*/
        return StringUtils.appendIfMissing(str, suffix, suffixes);
}

From source file:kenh.expl.functions.AppendIfMissing.java

public String process(String str, String suffix, String suffixes, boolean ignoreCase) {
    if (ignoreCase)
        return StringUtils.appendIfMissingIgnoreCase(str, suffix, suffixes);
    else//from   ww  w  .  j  a v  a2  s  . c  o m
        return StringUtils.appendIfMissing(str, suffix, suffixes);
}