Skip to content

Instantly share code, notes, and snippets.

@dubistdu dubistdu/create_phone.txt
Last active Mar 31, 2018

Embed
What would you like to do?
create phone number
def createPhoneNumber(array)
'(%d%d%d) %d%d%d-%d%d%d%d' % array
end
https://ruby-doc.org/core-2.2.0/Kernel.html
array count has to match that of d
each array item replaces d in string
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.