Class | String |
In: |
lib/merb-core/core_ext/string.rb
lib/merb-core/vendor/facets/inflect.rb |
Parent: | Object |
String: | The string with all regexp special characters escaped. |
"*?{}.".escape_regexp #=> "\\*\\?\\{\\}\\."
other<String>: | Base path to calculate against |
String: | Relative path from between the two |
"/opt/local/lib".relative_path_from("/opt/local/lib/ruby/site_ruby") # => "../.."
String: | The string converted to snake case. |
"FooBar".snake_case #=> "foo_bar" "HeadlineCNNNews".snake_case #=> "headline_cnn_news" "CNN".snake_case #=> "cnn"
String: | The path that is associated with the constantized string, assuming a conventional structure. |
"FooBar::Baz".to_const_path # => "foo_bar/baz"
String: | The path string converted to a constant name. |
"merb/core_ext/string".to_const_string #=> "Merb::CoreExt::String"
String: | The string with all regexp special characters unescaped. |
"\\*\\?\\{\\}\\.".unescape_regexp #=> "*?{}."