vendredi 22 octobre 2021

How can remove some special character from string of array

def valid_sheet_names
   Company.find(@company_id).asset_types.pluck(:name).reject(&:nil?).map(&:downcase)
end

["hardware", "computer", "network", "mobile devices"]

this function return an array.i want to remove space, dot and underscore from string. but i don'y know how can i do this

Aucun commentaire:

Enregistrer un commentaire