str_to_id function

String to 'id' format