private static char[] reduceCharacterArrayCapacity(char[] characters,
			char character) {

		int charactersLength = characters.length;

		int reducedLength = -1;

		locateCharacters: for (int index = charactersLength - 1; index > -1; index--) {

			char lastCharacter = characters[index];

			if (lastCharacter == character) {

				reducedLength = index;

			} else {

				break locateCharacters;

			}

		}

		if (reducedLength == -1) {

			return characters;

		}

		if (reducedLength == 0) {

			return new char[0];

		}

		char[] reduced = new char[reducedLength];

		for (int index = 0; index < reducedLength; index++) {

			reduced[index] = characters[index];

		}

		return reduced;

	}