Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

public class Main {
    /**
     * Returns jid address without resource specifier
     * */
    public static String parseBareJid(final String jid) {
        if (jid == null)
            return null;

        int indx = jid.indexOf('/');

        return jid.substring(0, indx < 0 ? jid.length() : indx);
    }
}