Class: String
- Inherits:
-
Object
- Object
- String
- Defined in:
- lib/rbplusplus.rb
Overview
:nodoc:
Instance Method Summary collapse
-
#as_variable ⇒ Object
Functionize attempts to rename a string in a cpp function friendly way.
Instance Method Details
#as_variable ⇒ Object
Functionize attempts to rename a string in a cpp function friendly way.
vector<float>::x => vector_float__x
67 68 69 |
# File 'lib/rbplusplus.rb', line 67 def as_variable gsub("::","_").gsub(/[ ,<>]/, "_").gsub("*", "Ptr") end |