Example usage for org.apache.commons.lang StringUtils replaceEach

List of usage examples for org.apache.commons.lang StringUtils replaceEach

Introduction

In this page you can find the example usage for org.apache.commons.lang StringUtils replaceEach.

Prototype

public static String replaceEach(String text, String[] searchList, String[] replacementList) 

Source Link

Document

Replaces all occurrences of Strings within another String.

Usage

From source file:se.lth.cs.koshik.analysis.lth.CharacterMapper.java

@Override
public void process(Document document) throws Exception {
    if (document.getContent() != null) {
        document.setContent(StringUtils.replaceEach(document.getContent(), searchList, replacementList));
    }//  w  w w .  j a  va  2 s.com
}

From source file:tvbrowser.ui.settings.channel.ChannelFilter.java

/**
 * Normalizes the Text for better Search results
 *
 * @param text Text to normalize/*from w w  w. java 2 s  .c  o  m*/
 * @return normalized Text
 */
private String normalizeCharacters(String text) {
    return StringUtils.replaceEach(text.toLowerCase().trim(), NORMALIZE_SEARCH, NORMALIZE_REPLACE);
}

From source file:uk.ac.sanger.artemis.io.GFF3Encoder.java

public static String decode(String s) {
    return StringUtils.replaceEach(s, mappedEscapes, mapChars);
}

From source file:uk.ac.sanger.artemis.io.GFF3Encoder.java

public static String encode(String s) {
    return StringUtils.replaceEach(s, mapChars, mappedEscapes);
}