package xyz.wbsite.frame.excel.converter;

/**
 * StringConverter - String转化器，重写了对象到String，String到对象的转化方式
 *
 * @author wangbing
 * @version 0.0.1
 * @since 2017-01-01
 */
public class StringConverter implements Converter<String> {

    @Override
    public String convert(String var) {
        return var != null ? var.trim() : null;
    }

    @Override
    public String string(String var) {
        if (var == null) {
            return "";
        }
        return String.valueOf(var);
    }
}
