library StringUtil {
    function stringToBytes12(string str)
        internal
        pure
        returns (bytes12 result)
    {
        assembly {
            result := mload(add(str, 32))
        }
    }
    function stringToBytes10(string str)
        internal
        pure
        returns (bytes10 result)
    {
        assembly {
            result := mload(add(str, 32))
        }
    }
    /// check length >= min && <= max
    function checkStringLength(string name, uint min, uint max)
        internal
        pure
        returns (bool)
    {
        bytes memory temp = bytes(name);
        return temp.length >= min && temp.length <= max;
    }
}
/// @title Utility Functions for address
/// @author Kongliang Zhong - <kongliang@loopring.org>
function checkStringLength(string name, uint min, uint max)
    internal
    pure
    returns (bool)
{
    bytes memory temp = bytes(name);
    return temp.length >= min && temp.length <= max;
}

/// check length >= min && <= max