Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
import android.net.Uri;

public class Main {
    public static final String GITHUB_BASE = "github.com";

    public static String getGithubShareUrl(String repoIdentifier) {
        String[] arr = repoIdentifier.split("/");
        Uri.Builder uriBuilder = new Uri.Builder();
        uriBuilder.scheme("https").authority(GITHUB_BASE).appendPath(arr[0]).appendPath(arr[1]);
        return uriBuilder.build().toString();
    }
}