Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
//License from project: Open Source License 

import android.text.TextUtils;
import android.util.Pair;

public class Main {
    public static Pair<String, String> parseQuoteUsernamePostid(final String usernamePostId) {
        if (TextUtils.isEmpty(usernamePostId)) {
            return null;
        }
        final String[] split = usernamePostId.split(";");
        if (split.length == 0) {
            return null;
        } else if (split.length == 1) {
            return new Pair<>(split[0], null);
        }
        return new Pair<>(split[0], split[1]);
    }
}