Class: String
- Inherits:
-
Object
- Object
- String
- Defined in:
- lib/red_query/string.rb
Overview
useful web extensions for strings
Instance Method Summary collapse
- #substr(index, length) ⇒ Object
-
#to_uri_component ⇒ Object
encodes string to URI-Component.
Instance Method Details
#substr(index, length) ⇒ Object
11 12 13 |
# File 'lib/red_query/string.rb', line 11 def substr(index, length) String.new(`#{self}.__value__.substr(#{index}, #{length})`) end |
#to_uri_component ⇒ Object
encodes string to URI-Component
7 8 9 |
# File 'lib/red_query/string.rb', line 7 def to_uri_component String.new(`encodeURIComponent(#{self}.__value__)`) end |