icegem-core/src/main/java/com/googlecode/icegem/utils/CacheUtils.java
public static String[] getFirstLocatorFromLocatorsString(
			String locatorsString) {
		if (locatorsString == null || locatorsString.length() == 0) {
			return new String[2];
		}

		String[] firstLocator = new String[2];

		firstLocator[0] = locatorsString.substring(0,
				locatorsString.indexOf('[')).trim();

		locatorsString = locatorsString
				.substring(locatorsString.indexOf('[') + 1);

		firstLocator[1] = locatorsString.substring(0,
				locatorsString.indexOf(']'));

		return firstLocator;
	}
public static String[] getFirstLocatorFromLocatorsString(
			String locatorsString) {
		if (locatorsString == null || locatorsString.length() == 0) {
			return new String[2];
		}

		String[] firstLocator = new String[2];

		firstLocator[0] = locatorsString.substring(0,
				locatorsString.indexOf('[')).trim();

		locatorsString = locatorsString
				.substring(locatorsString.indexOf('[') + 1);

		firstLocator[1] = locatorsString.substring(0,
				locatorsString.indexOf(']'));

		return firstLocator;
	}
Returns first locator host and port from locators string.

@param locatorsString
of type String
@return String[0] - locator host String[1] - locator port