ライブラリ
- English (24)
- ビルトイン (402)
- csv (96)
- digest (60)
-
net
/ http (24) -
net
/ pop (108) - psych (19)
- readline (12)
-
rexml
/ document (36) -
ripper
/ filter (12) - stringio (72)
- strscan (24)
-
webrick
/ log (12) - zlib (84)
クラス
- Array (21)
- CSV (84)
-
Digest
:: Base (60) - Enumerator (24)
- IO (12)
- Method (24)
-
Net
:: HTTPResponse (24) -
Net
:: POPMail (108) - Object (48)
- String (225)
- StringIO (72)
- StringScanner (24)
-
WEBrick
:: BasicLog (12) -
Zlib
:: Deflate (48) -
Zlib
:: Inflate (36)
オブジェクト
-
Readline
:: HISTORY (12)
キーワード
-
$ INPUT _ RECORD _ SEPARATOR (12) -
$ RS (12) -
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (12) - CSV (12)
- Default (12)
- Filter (12)
-
NEWS for Ruby 2
. 1 . 0 (12) -
NEWS for Ruby 2
. 7 . 0 (6) - Pretty (12)
- Rubyで使われる記号の意味(正規表現の複雑な記号は除く) (12)
- String (12)
- Transitive (12)
- all (36)
- clone (12)
- concat (33)
-
define
_ singleton _ method (24) - digest (12)
- digest! (12)
- dup (12)
- filter (36)
- finish (24)
- flush (12)
- gets (12)
- gsub (48)
- gsub! (48)
- hexdigest (12)
- hexdigest! (12)
- inspect (12)
- mail (36)
- new (24)
- open (72)
- pack (21)
- pack テンプレート文字列 (12)
- pop (36)
- pos= (12)
-
read
_ body (24) - readline (12)
- readlines (12)
- readpartial (12)
- rss (12)
-
ruby 1
. 6 feature (12) -
ruby 1
. 8 . 2 feature (12) -
ruby 1
. 8 . 3 feature (12) -
safe
_ load (19) -
set
_ dictionary (24) - sub (36)
- sub! (36)
- sum (12)
-
to
_ s (24) - unpack (12)
-
webrick
/ cgi (12) -
with
_ object (24) - クラス/メソッドの定義 (12)
- リテラル (12)
検索結果
先頭5件
-
String
# <<(other) -> self (27118.0) -
self に文字列 other を破壊的に連結します。 other が 整数である場合は other.chr(self.encoding) 相当の文字を末尾に追加します。
...追加します。
self を返します。
@param other 文字列もしくは 0 以上の整数
//emlist[例][ruby]{
str = "string"
str.concat "XXX"
p str # => "stringXXX"
str << "YYY"
p str # => "stringXXXYYY"
str << 65 # 文字AのASCIIコード
p str # => "stringXXXYYYA"
//}... -
StringIO
# string -> String (21220.0) -
自身が表す文字列を返します。
...たバッファとして使われている文字列です。
文字列は複製されないことに注意して下さい。
//emlist[例][ruby]{
require "stringio"
sio = StringIO.new
sio << "abc"
s = sio.string
p s #=> "abc"
sio << "xyz"
p s #=> "abcxyz"
//}... -
StringScanner
# <<(str) -> self (21136.0) -
操作対象の文字列に対し str を破壊的に連結します。 マッチ記録は変更されません。
...[例][ruby]{
require 'strscan'
s = StringScanner.new('test') # => #<StringScanner 0/4 @ "test">
s.scan(/\w(\w*)/) # => "test"
s[0] # => "test"
s[1] # => "est"
s << ' string' # => #<StringScanner 4/11 "test" @ " stri...">
s......# => "string"
//}
この操作は StringScanner.new に渡した文字列にも影響することがあります。
//emlist[例][ruby]{
require 'strscan'
str = 'test'
s = StringScanner.new(str) # => #<StringScanner 0/4 @ "test">
s << ' string' # => #<StringScanner 0/11 @ "......test ...">
str # => "test string"
//}... -
StringIO
# <<(obj) -> self (21100.0) -
obj を pos の位置に書き込みます。 必要なら obj.to_s を呼んで 文字列に変換します。 self を返します。
obj を pos の位置に書き込みます。 必要なら obj.to_s を呼んで
文字列に変換します。 self を返します。
@param obj 自身に書き込みたい、文字列か to_s が定義されたオブジェクトを指定します。 -
Zlib
:: Deflate # <<(string) -> self (18247.0) -
Zlib::Deflate#deflate と同じように string を 圧縮ストリームに入力しますが、Zlib::Deflate オブジェクト そのものを返します。圧縮ストリームからの出力は、 出力バッファに保存されます。
...Zlib::Deflate#deflate と同じように string を
圧縮ストリームに入力しますが、Zlib::Deflate オブジェクト
そのものを返します。圧縮ストリームからの出力は、
出力バッファに保存されます。
@param string 圧縮する文字列を指定しま......す。
require 'zlib'
dez = Zlib::Deflate.new
dez << "123" * 5 << "ugougo" << "123" * 5 << "hogehoge"
dezstr = dez.finish
p dezstr #=> "x\2343426DB\245\351\371@d\210*\230\221\237\236\n\302\000\356\275\v\271"... -
Readline
:: HISTORY . <<(string) -> self (18241.0) -
ヒストリの最後に string で指定した文字列を追加します。 self を返します。
...ヒストリの最後に string で指定した文字列を追加します。
self を返します。
@param string 文字列を指定します。
例: "foo"を追加する。
require "readline"
Readline::HISTORY << "foo"
p Readline::HISTORY[-1] #=> "foo"
例: "foo"、"bar"を追加す......る。
require "readline"
Readline::HISTORY << "foo" << "bar"
p Readline::HISTORY[-1] #=> "bar"
p Readline::HISTORY[-2] #=> "foo"
@see Readline::HISTORY.push... -
Zlib
:: Inflate # <<(string) -> self (18229.0) -
Zlib::Inflate#inflate と同じように string を 展開ストリームに入力しますが、Zlib::Inflate オブジェクト そのものを返します。展開ストリームからの出力は、 出力バッファに保存されます。
...Zlib::Inflate#inflate と同じように string を
展開ストリームに入力しますが、Zlib::Inflate オブジェクト
そのものを返します。展開ストリームからの出力は、
出力バッファに保存されます。
require 'zlib'
cstr = "x\234\313\310OOUH+MOTH\3......15K\001\000!\251\004\276"
inz = Zlib::Inflate.new
inz << cstr[0, 10]
p inz.flush_next_out #=> "hoge fu"
inz << cstr[10..-1]
p inz.flush_next_out #=> "ga end"... -
String
# concat(other) -> self (12018.0) -
self に文字列 other を破壊的に連結します。 other が 整数である場合は other.chr(self.encoding) 相当の文字を末尾に追加します。
...追加します。
self を返します。
@param other 文字列もしくは 0 以上の整数
//emlist[例][ruby]{
str = "string"
str.concat "XXX"
p str # => "stringXXX"
str << "YYY"
p str # => "stringXXXYYY"
str << 65 # 文字AのASCIIコード
p str # => "stringXXXYYYA"
//}... -
String
# concat(*arguments) -> self (12003.0) -
self に複数の文字列を破壊的に連結します。
self に複数の文字列を破壊的に連結します。
引数の値が整数である場合は Integer#chr の結果に相当する文字を末尾に追加します。追加する文字のエンコーディングは self.encoding です。
self を返します。
@param arguments 複数の文字列もしくは 0 以上の整数
//emlist[例][ruby]{
str = "foo"
str.concat
p str # => "foo"
str = "foo"
str.concat "bar", "baz"
p str # => "foobarbaz"
str = "foo"
str....