Module | Ramaze::CoreExtensions::String
In: | lib/ramaze/snippets/string/camel_case.rb lib/ramaze/snippets/string/color.rb lib/ramaze/snippets/string/end_with.rb lib/ramaze/snippets/string/esc.rb lib/ramaze/snippets/string/ord.rb lib/ramaze/snippets/string/snake_case.rb lib/ramaze/snippets/string/start_with.rb lib/ramaze/snippets/string/unindent.rb

Extensions for String

### Methods

camel_case end_with? escape ord snake_case start_with? ui ui! unindent unindent!

### External Aliases

'escape' | -> | 'esc'

### Public Instance methods

camel_case()

Simple transformation to CamelCase from snake_case

@example

     'foo_bar'.camel_case # => 'FooBar'

end_with?(other)

Compatibility with 1.9

escape(which = :html)

String#escape is an extensible escaping mechanism for string. currently it suports

      '<div>foo bar</div>'.esc(:html)
      'foo bar'.esc(:uri)
      'foo bar'.esc(:cgi)

ord()

compatibility with Ruby 1.9

snake_case()

convert to snake_case from CamelCase

@example

     'FooBar'.snake_case # => 'foo_bar'

start_with?(other)

Compatibility with 1.9

ui()

Alias for unindent

ui!()

Alias for unindent!

unindent()

Useful for writing indented String and unindent on demand, based on the first line with indentation.

unindent!()

Destructive variant of undindent, replacing the String

[Validate]