Class: String
- Inherits:
-
Object
- Object
- String
- Defined in:
- lib/shioruby.rb
Overview
convenient for SHIORI Request treatment
Instance Method Summary (collapse)
-
- (Array<String>) separated(separator = "\x01")
split \x01 separated Reference* value like “arg1\x01arg2\x01arg3” into Array.
-
- (Array<Array<String>>) separated2(separator1 = "\x02", separator2 = "\x01")
split \x01, \x02 separated Reference* value like “arg1-1\x01arg1-2\x02arg2-1\x01arg2-2” into Array of Array.
Instance Method Details
- (Array<String>) separated(separator = "\x01")
split \x01 separated Reference* value like “arg1\x01arg2\x01arg3” into Array
67 68 69 |
# File 'lib/shioruby.rb', line 67 def separated(separator = "\x01") self.split(separator) end |
- (Array<Array<String>>) separated2(separator1 = "\x02", separator2 = "\x01")
split \x01, \x02 separated Reference* value like “arg1-1\x01arg1-2\x02arg2-1\x01arg2-2” into Array of Array
75 76 77 |
# File 'lib/shioruby.rb', line 75 def separated2(separator1 = "\x02", separator2 = "\x01") self.split(separator1).map {|element| element.split(separator2)} end |