Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

public class Main {
    static String CACHESUFFIX = ".CACHEIMG";

    public static String convertStr(String str) {
        String lowerStr = "";
        try {
            lowerStr = str.toLowerCase().replace("http://", "");
            lowerStr = lowerStr.substring(lowerStr.indexOf("/"), lowerStr.length());
            return lowerStr.replace("/", "").replace("images", "").replace("image", "").replace(":", "")
                    .replace(".", "").replace("-", "").replace("jpg", "").replace("png", "").toUpperCase().trim()
                    + CACHESUFFIX;
        } catch (Exception e) {
            lowerStr = "cachetemp" + CACHESUFFIX;
        }
        return lowerStr;
    }
}