lambda for string cast