Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import android.text.TextUtils;

public class Main {
    private static final String PACKAGE_STR = "package:";

    public static String convertPackageName(String packageName) {
        if (TextUtils.isEmpty(packageName)) {
            return "";
        }
        int num = packageName.indexOf(PACKAGE_STR);
        if (num != -1) {
            return packageName.substring(PACKAGE_STR.length() + num, packageName.length());
        }
        return packageName;
    }
}