convert Word Seperator To Space - Android java.lang

Android examples for java.lang:String Convert

Description

convert Word Seperator To Space

Demo Code

import android.util.Log;
import java.io.UnsupportedEncodingException;

public class Main{

    public static String convertWordSeperatorToSpace(String input) {
        if (input.indexOf(' ') == -1 && input.indexOf('_') != -1) {
            return input.replace("_", " ");
        }//from  ww  w.  j  a v  a2  s .  c o m
        return input;
    }

}

Related Tutorials