library strings {
    struct slice {
        uint _len;
        uint _ptr;
    }
    
    /*
     * @dev Returns a slice containing the entire string.
     * @param self The string to make a slice from.
     * @return A newly allocated slice containing the entire string.
     */
    function toSlice(string self) internal pure returns (slice) {
        uint ptr;
        assembly {
            ptr := add(self, 0x20)
        }
        return slice(bytes(self).length, ptr);
    }
    
    /*
     * @dev Returns true if the slice is empty (has a length of 0).
     * @param self The slice to operate on.
     * @return True if the slice is empty, False otherwise.
     */
    function empty(slice self) internal pure returns (bool) {
        return self._len == 0;
    }
}
//>> Reference to https://github.com/Arachnid/solidity-stringutils
function toSlice(string self) internal pure returns (slice) {
    uint ptr;
    assembly {
        ptr := add(self, 0x20)
    }
    return slice(bytes(self).length, ptr);
}

/*
 * @dev Returns a slice containing the entire string.
 * @param self The string to make a slice from.
 * @return A newly allocated slice containing the entire string.
 */