Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import android.util.Log;

public class Main {
    public static String replaceUrlcode(String str) {
        Log.e("log", "replaceUrlcode");
        if (!str.contains(" "))
            return str;

        //StringBuffer sb = new StringBuffer(str);
        //int position = str.indexOf("\\+");
        //str.split("%20", position);

        str = str.replaceAll(" ", "%20");
        Log.e("log", "replaceUrlcode:" + str);
        return replaceUrlcode(str);
    }
}