Add tags

Add tags to the following comment
Rubyが既に8件ありますが,久し振りに投稿.

単語間にタブが…とか細かいことは考えない.

正規表現とか,Rubyの構文とかを見直せばもっと短くなるんじゃないか?
1
2
3
4
puts gets.gsub(/(^.| .)/){$1.upcase}

# $ echo 'LL day and night'|ruby this_answer.rb
#=> LL Day And Night

Add tags

The input will be splited to tags with space.

Index

Feed

Other

Link

Pathtraq

loading...