Class: String
- Inherits:
-
Object
- Object
- String
- Defined in:
- lib/udb_helpers/backend_helpers.rb
Overview
Add to standard String class.
Instance Method Summary collapse
-
#sanitize ⇒ String
Should be called on all RISC-V extension, instruction, CSR, and CSR field names.
Instance Method Details
#sanitize ⇒ String
Should be called on all RISC-V extension, instruction, CSR, and CSR field names. Parameters never have periods in their names so they don’t need to be sanitized.
20 |
# File 'lib/udb_helpers/backend_helpers.rb', line 20 def sanitize = String.new(self).gsub(".", "_").gsub("&", "_and_") |