web/src/main/java/org/springframework/security/web/authentication/www/DigestAuthUtils.java
static String[] split(String toSplit, String delimiter) {
		Assert.hasLength(toSplit, "Cannot split a null or empty string");
		Assert.hasLength(delimiter,
				"Cannot use a null or empty delimiter to split a string");

		if (delimiter.length() != 1) {
			throw new IllegalArgumentException(
					"Delimiter can only be one character in length");
		}

		int offset = toSplit.indexOf(delimiter);

		if (offset < 0) {
			return null;
		}

		String beforeDelimiter = toSplit.substring(0, offset);
		String afterDelimiter = toSplit.substring(offset + 1);

		return new String[] { beforeDelimiter, afterDelimiter };
	}
static String[] split(String toSplit, String delimiter) {
		Assert.hasLength(toSplit, "Cannot split a null or empty string");
		Assert.hasLength(delimiter,
				"Cannot use a null or empty delimiter to split a string");

		if (delimiter.length() != 1) {
			throw new IllegalArgumentException(
					"Delimiter can only be one character in length");
		}

		int offset = toSplit.indexOf(delimiter);

		if (offset < 0) {
			return null;
		}

		String beforeDelimiter = toSplit.substring(0, offset);
		String afterDelimiter = toSplit.substring(offset + 1);

		return new String[] { beforeDelimiter, afterDelimiter };
	}
static String [ ] split ( String toSplit , String delimiter ) { Assert . hasLength ( toSplit , "Cannot split a null or empty string" ) ; Assert . hasLength ( delimiter , "Cannot use a null or empty delimiter to split a string" ) ; if ( delimiter . length ( ) != 1 ) { throw new IllegalArgumentException ( "Delimiter can only be one character in length" ) ; } int offset = toSplit . indexOf ( delimiter ) ; if ( offset < 0 ) { return null ; } String beforeDelimiter = toSplit . substring ( 0 , offset ) ; String afterDelimiter = toSplit . substring ( offset + 1 ) ; return new String [ ] { beforeDelimiter , afterDelimiter } ; }
Splits a <code>String</code> at the first instance of the delimiter.
<p>
Does not include the delimiter in the response.
</p>

@param toSplit the string to split
@param delimiter to split the string up with
@return a two element array with index 0 being before the delimiter, and index 1
being after the delimiter (neither element includes the delimiter)
@throws IllegalArgumentException if an argument was invalid
Splits a <code > String< / code > at the first instance of the delimiter . <p > Does not include the delimiter in the response . < / p >