Home
Ruby
ActiveRecord
Array
CGI
Class
Collections
Database
Date
Design Patterns
Development
File Directory
GUI
Hash
Language Basics
Method
Network
Number
Rails
Range
Reflection
Statement
String
Threads
Time
Tk
Unit Test
Windows Platform
XML
Menu
Convert to Symbol « String « Ruby
Ruby
String
Convert to Symbol
1.
To convert a string into a symbol (Symbol class), use either the to_sym or intern methods
2.
The value of the string, not its name, becomes the symbol