Strings in ruby Cheat Sheet

A Programming › Ruby cheat sheet in English by nedzadarek

Strings in ruby

14,277 views 2,560 downloads 18 Jul 2013 History
3.1 avg · 1 rating

Strings in ruby

Name
Example
Interp­olated?
' '
'­str­ing­'
" "
"­str­ing­"
yes
% notation
%[string]
only without or with Q modyfier
"Here docume­nt" notation
<<HERE
yes
 
string
 
HERE

Percentage notation

Name
Example
Interp­olated
Q
%Q[]
yes
q
%q[]
no

Here document

<<D­ELI­MITER
some string
' ' "­str­ing­" can have
#{inte­rpo­lat­ed_­var­iable}
DELIMITER
with '­-' ending delimiter can start with spaces
<<-­DEL­IMITER
text
_DELIMITER
Underscore used instead of space

Badges

Nice Cheat Sheet Good Cheat Sheet Downloaded from Unusual Locations × 4

Comments

No comments yet.

Cheatography n. The art of mapping complex subjects into clear, instantly navigable reference guides.