Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

public class Main {

    public static String[] splitLabelAndValue(String str) {
        return splitLabelAndValue(str, ":");
    }

    public static String[] splitLabelAndValue(String str, String expr) {
        String[] strs = null;
        if (str != null && str.indexOf(expr) > 0) {
            strs = str.split(expr);
        }
        return strs;
    }
}