KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
Given strings like: Bob Bob, Bob Bob Burns, How can you return that w/o a comma? Bob Bob Bob Bob Burns Also, I would want this method not to break if passed a nil, just to return a nil? def remove_trailing_comma(str) !str.nil? ? str.replace(",") :nil end
Tags (comma-separated)
Save Edits
Cancel