// Decompiled by Jad v1.5.8e. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.geocities.com/kpdus/jad.html
// Decompiler options: packimports(3) fieldsfirst 
// Source File Name:   UString.java

package drm.util;

import java.util.StringTokenizer;

public class UString
{

	public UString()
	{
	}

	public static String[] parse(String text)
	{
		String pline[] = new String[0];
		StringTokenizer tokenizer = new StringTokenizer(text);
		if(tokenizer.countTokens() > 0)
		{
			pline = new String[tokenizer.countTokens()];
			for(int i = 0; i < pline.length; i++)
				pline[i] = tokenizer.nextToken();

		}
		return pline;
	}

	public static String[] parse(String text, String delimiters)
	{
		String pline[] = new String[0];
		StringTokenizer tokenizer = new StringTokenizer(text, delimiters);
		if(tokenizer.countTokens() > 0)
		{
			pline = new String[tokenizer.countTokens()];
			for(int i = 0; i < pline.length; i++)
				pline[i] = tokenizer.nextToken();

		}
		return pline;
	}

	public static String makeSingleLine(double array[], String separator)
	{
		String line = "";
		if(array.length > 0)
		{
			line = String.valueOf(array[0]);
			for(int i = 1; i < array.length; i++)
				line = line.concat(separator.concat(String.valueOf(array[i])));

		}
		return line;
	}

	public static String makeSingleLine(int array[], String separator)
	{
		String line = "";
		if(array.length > 0)
		{
			line = String.valueOf(array[0]);
			for(int i = 1; i < array.length; i++)
				line = line.concat(separator.concat(String.valueOf(array[i])));

		}
		return line;
	}

	public static String makeSingleLine(boolean array[], String separator)
	{
		String line = "";
		if(array.length > 0)
		{
			line = String.valueOf(array[0]);
			for(int i = 1; i < array.length; i++)
				line = line.concat(separator.concat(String.valueOf(array[i])));

		}
		return line;
	}

	public static String makeSingleLine(Object array[], String separator)
	{
		String line = "";
		if(array.length > 0)
		{
			line = String.valueOf(array[0]);
			for(int i = 1; i < array.length; i++)
				line = line.concat(separator.concat(String.valueOf(array[i])));

		}
		return line;
	}

	public static String makeSingleLine(double matrix[][], String separator1, String separator2)
	{
		String line = "";
		if(matrix.length > 0)
		{
			line = makeSingleLine(matrix[0], separator1);
			for(int i = 1; i < matrix.length; i++)
				line = line.concat(separator2.concat(makeSingleLine(matrix[i], separator1)));

		}
		return line;
	}

	public static String makeSingleLine(int matrix[][], String separator1, String separator2)
	{
		String line = "";
		if(matrix.length > 0)
		{
			line = makeSingleLine(matrix[0], separator1);
			for(int i = 1; i < matrix.length; i++)
				line = line.concat(separator2.concat(makeSingleLine(matrix[i], separator1)));

		}
		return line;
	}

	public static String makeSingleLine(boolean matrix[][], String separator1, String separator2)
	{
		String line = "";
		if(matrix.length > 0)
		{
			line = makeSingleLine(matrix[0], separator1);
			for(int i = 1; i < matrix.length; i++)
				line = line.concat(separator2.concat(makeSingleLine(matrix[i], separator1)));

		}
		return line;
	}

	public static String makeSingleLine(Object matrix[][], String separator1, String separator2)
	{
		String line = "";
		if(matrix.length > 0)
		{
			line = makeSingleLine(matrix[0], separator1);
			for(int i = 1; i < matrix.length; i++)
				line = line.concat(separator2.concat(makeSingleLine(matrix[i], separator1)));

		}
		return line;
	}
}
