Skip to content

Instantly share code, notes, and snippets.

@wicky-andrian
Created April 23, 2020 16:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wicky-andrian/7a61d027af33530693977aaf57938fae to your computer and use it in GitHub Desktop.
Save wicky-andrian/7a61d027af33530693977aaf57938fae to your computer and use it in GitHub Desktop.
Contoh metode string part 6
a = "Pemrograman Ruby"
puts a
puts "Objek ID: #{a.object_id}"
b = a.swapcase
puts b
puts "Objek ID: #{b.object_id}"
c = a.swapcase!
puts c
puts "Objek ID: #{c.object_id}"
puts "Contoh D Sebaliknya"
d = c.swapcase!
puts d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment