Java String Translate translate(String name, int type)

Here you can find the source of translate(String name, int type)

Description

translate

License

Apache License

Declaration

public static String translate(String name, int type) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

public class Main {
    public static String translate(String name, int type) {
        if (type == 0) { // ????????
            name = name.substring(1, name.length() - 1);
            name = name.replace('/', '.');
            return name;
        } else {/*w w w. ja  v a 2 s.  co  m*/
            name = name.replace('.', '/');
            name = "/" + name + "/";
            return name;
        }
    }
}

Related

  1. translate(String input, String xmlName)
  2. translate(String message, String charsToBeReplaced, String replacementChars)
  3. translate(String originalHtml)
  4. translate(String s)
  5. translate(String s)
  6. translate(String s, String identifier, String associator)