package com.microstar.tap3.common;

public class StrUtil
{

	public static String deformatPhone(String phone)
	{
		if ( phone == null )
			return null;
		
		return phone
				.replace("(", "")
				.replace(")", "")
				.replace(" ", "")
				.replace(".", "")
				.replace("-", "")
				.trim();
	}
	
	public static String deformatEmail(String email)
	{
		if ( email == null )
			return null;
		
		return email.trim();
	}
	
	public static String updateString(String origValue, String mergeValue)
	{
		if ( origValue == null )
			return mergeValue;
		
		if ( mergeValue == null )
			return origValue;
		
		return mergeValue;
	}
}
