Created
April 23, 2020 16:24
-
-
Save wicky-andrian/7a61d027af33530693977aaf57938fae to your computer and use it in GitHub Desktop.
Contoh metode string part 6
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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