package util;

import java.util.Arrays;
import java.util.stream.Collectors;

/*
 * Copyright 2014 Taylor Caldwell
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

public final class Convert {

	public static String longToString(long... input) {
		return Arrays.stream(input).mapToObj(l -> ((Long) l).toString()).collect(Collectors.joining(","));
	}

	public static String normalizeSummonerName(String summonerName) {
		// Note for contributors: If you change this, don't strip commas! It could break comma-separated lists of summonerNames
		return summonerName.toLowerCase().replaceAll("\\s+", "");
	}

	public static String[] normalizeSummonerNames(String... summonerNames) {
		// Note for contributors: If you change this, don't strip commas! It could break comma-separated lists of summonerNames
		return Arrays.stream(summonerNames).map(s -> normalizeSummonerName(s)).toArray(size -> new String[size]);
	}
}
@@ -1189,130 +1189,8 @@
 ) %7B%0A
-%09%09// Note for contributors: If you change this, don't strip commas! It could break comma-separated lists of summonerNames%0A
 %09%09re

clean up