0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

文字列を作るときに%でも作る方法を見つけたので備忘録

Posted at

#目的
文字列を作るときに%でも作る方法を見つけたので備忘録
#感想
使うんかなぁ

#%q! ! シングルクオートで囲んだことになる

%q!!
puts %q!Hello world! #=> Hello world

#%Q! ! ダブルクオートで囲んだことになる

%Q!!
it = this
puts %q!#{it}Hello world! #=> this Hello world

#%! ! ダブルクオートで囲んだことになる

%!!
it = this
puts %q!#{it}Hello world! #=> this Hello world

#参考
プロを目指す人のためのRuby入門書

0
0
2

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?