Here you can find the source of splitNamespaceTitle(String fullTitle)
public static String[] splitNamespaceTitle(String fullTitle)
//package com.java2s; //License from project: Open Source License import java.util.*; public class Main { public static final Map<String, Integer> NAMESPACE_MAP = new HashMap<String, Integer>(); public static String[] splitNamespaceTitle(String fullTitle) { String[] fields = new String[2]; fields[0] = ""; fields[1] = fullTitle;/*from ww w. j a va 2 s.com*/ int i = fullTitle.indexOf(":"); if (i > 0) { String namespace = fullTitle.substring(0, i); Integer ns = NAMESPACE_MAP.get(namespace); if (ns != null) { fields[0] = namespace; fields[1] = fullTitle.substring(i + 1); } } return fields; } }