別のキーワード
ライブラリ
- ビルトイン (724)
- csv (24)
- kconv (12)
-
net
/ http (72) - open-uri (24)
- psych (36)
-
rexml
/ document (60) - ripper (12)
-
webrick
/ httprequest (12)
クラス
-
ARGF
. class (12) - Array (21)
- CSV (24)
- Encoding (84)
-
Encoding
:: Converter (192) -
Encoding
:: InvalidByteSequenceError (24) -
Encoding
:: UndefinedConversionError (12) - IO (30)
- Integer (24)
-
Psych
:: Stream (24) -
Psych
:: Visitors :: YAMLTree (12) -
REXML
:: Document (36) -
REXML
:: Instruction (24) - Regexp (12)
- Ripper (12)
- String (283)
- Time (42)
-
WEBrick
:: HTTPRequest (12)
モジュール
-
Net
:: HTTPHeader (72) -
OpenURI
:: Meta (24)
キーワード
- << (12)
-
append
_ as _ bytes (1) -
ascii
_ compatible? (12) - asctime (12)
- b (12)
- casecmp (12)
- chr (24)
- chunked? (12)
- concat (21)
- content (12)
-
content
_ encoding (12) - convert (12)
- convpath (12)
- ctime (12)
-
destination
_ encoding (12) - dummy? (12)
- each (12)
-
each
_ capitalized _ name (12) -
each
_ header (12) -
each
_ key (12) -
each
_ name (12) - encode (36)
- encode! (24)
-
error
_ bytes (12) -
error
_ char (12) -
external
_ encoding (12) - finish (12)
-
fixed
_ encoding? (12) -
force
_ encoding (12) -
incomplete
_ input? (12) -
insert
_ output (12) - inspect (30)
-
internal
_ encoding (24) - iseuc (12)
-
last
_ error (12) - name (12)
- names (12)
- pack (21)
-
primitive
_ convert (48) -
primitive
_ errinfo (12) - putback (24)
- query (12)
- replacement (12)
- replacement= (12)
- replicate (12)
- scrub (36)
- scrub! (36)
-
set
_ encoding _ by _ bom (6) -
source
_ encoding (12) -
stand
_ alone? (12) - start (36)
- target (12)
-
to
_ s (24) -
unicode
_ normalize (11) -
unicode
_ normalize! (11) -
unicode
_ normalized? (11) - unpack (12)
-
valid
_ encoding? (12) - version (12)
検索結果
先頭5件
-
String
# <<(other) -> self (25.0) -
self に文字列 other を破壊的に連結します。 other が 整数である場合は other.chr(self.encoding) 相当の文字を末尾に追加します。
...に連結します。
other が 整数である場合は other.chr(self.encoding) 相当の文字を末尾に追加します。
self を返します。
@param other 文字列もしくは 0 以上の整数
//emlist[例][ruby]{
str = "string"
str.concat "XXX"
p str # => "stringXXX"
str << "Y... -
String
# concat(other) -> self (25.0) -
self に文字列 other を破壊的に連結します。 other が 整数である場合は other.chr(self.encoding) 相当の文字を末尾に追加します。
...に連結します。
other が 整数である場合は other.chr(self.encoding) 相当の文字を末尾に追加します。
self を返します。
@param other 文字列もしくは 0 以上の整数
//emlist[例][ruby]{
str = "string"
str.concat "XXX"
p str # => "stringXXX"
str << "Y... -
String
# unicode _ normalize(form = :nfc) -> String (25.0) -
self を NFC、NFD、NFKC、NFKD のいずれかの正規化形式で Unicode 正規化し た文字列を返します。
...規化形式を :nfc、:nfd、:nfkc、:nfkd のいずれかで指定しま
す。省略した場合は :nfc になります。
@raise Encoding::CompatibilityError self が Unicode 文字列ではない場合
に発生します。
このメソッド......なっています。
//emlist[例][ruby]{
"a\u0300".unicode_normalize # => 'à' ("\u00E0" と同じ)
"a\u0300".unicode_normalize(:nfc) # => 'à' ("\u00E0" と同じ)
"\u00E0".unicode_normalize(:nfd) # => 'à' ("a\u0300" と同じ)
"\xE0".force_encoding('ISO-8859-1').unicode_normalize(:nf......d)
# => Encoding::CompatibilityError raised
//}
@see String#unicode_normalize!, String#unicode_normalized?... -
String
# unicode _ normalized?(form = :nfc) -> bool (25.0) -
self が引数 form で指定された正規化形式で Unicode 正規化された文字列か どうかを返します。
...す。省略した場合は :nfc になります。
@raise Encoding::CompatibilityError self が Unicode 文字列ではない場合
に発生します。
//emlist[例][ruby]{
"a\u0300".unicode_normalized? # => false
"a\u0300".unicode_normali......=> true
"\u00E0".unicode_normalized? # => true
"\u00E0".unicode_normalized?(:nfd) # => false
"\xE0".force_encoding('ISO-8859-1').unicode_normalized?
# => Encoding::CompatibilityError raised
//}
@see String#unicode_normalize, String#unicode_normalize!... -
Time
# asctime -> String (25.0) -
時刻を asctime(3) の形式の文字列に変換します。た だし、末尾の改行文字 "\n" は含まれません。
...れません。
戻り値の文字エンコーディングは Encoding::US_ASCII です。
//emlist[][ruby]{
p Time.local(2000).asctime # => "Sat Jan 1 00:00:00 2000"
p Time.local(2000).asctime.encoding # => #<Encoding:US-ASCII>
p Time.local(2000).ctime # => "Sat Jan 1... -
Time
# ctime -> String (25.0) -
時刻を asctime(3) の形式の文字列に変換します。た だし、末尾の改行文字 "\n" は含まれません。
...れません。
戻り値の文字エンコーディングは Encoding::US_ASCII です。
//emlist[][ruby]{
p Time.local(2000).asctime # => "Sat Jan 1 00:00:00 2000"
p Time.local(2000).asctime.encoding # => #<Encoding:US-ASCII>
p Time.local(2000).ctime # => "Sat Jan 1... -
String
# <<(other) -> self (23.0) -
self に文字列 other を破壊的に連結します。 other が 整数である場合は other.chr(self.encoding) 相当の文字を末尾に追加します。
...に連結します。
other が 整数である場合は other.chr(self.encoding) 相当の文字を末尾に追加します。
self を返します。
@param other 文字列もしくは 0 以上の整数
//emlist[例][ruby]{
str = "string"
str.concat "XXX"
p str # => "stringXXX"
str << "Y... -
String
# concat(other) -> self (23.0) -
self に文字列 other を破壊的に連結します。 other が 整数である場合は other.chr(self.encoding) 相当の文字を末尾に追加します。
...に連結します。
other が 整数である場合は other.chr(self.encoding) 相当の文字を末尾に追加します。
self を返します。
@param other 文字列もしくは 0 以上の整数
//emlist[例][ruby]{
str = "string"
str.concat "XXX"
p str # => "stringXXX"
str << "Y... -
Net
:: HTTPHeader # each {|name , val| . . . . } -> () (19.0) -
保持しているヘッダ名とその値をそれぞれ ブロックに渡して呼びだします。
...mlist[例][ruby]{
require 'net/http'
uri = URI.parse('http://www.example.com/index.html')
req = Net::HTTP::Get.new(uri.request_uri)
req.each_header { |key,value| puts "#{key} = #{value}" }
# => accept-encoding = gzip;q=1.0,deflate;q=0.6,identity;q=0.3
# => accept = */*
# => user-agent = Ruby
//}... -
Net
:: HTTPHeader # each _ header {|name , val| . . . . } -> () (19.0) -
保持しているヘッダ名とその値をそれぞれ ブロックに渡して呼びだします。
...mlist[例][ruby]{
require 'net/http'
uri = URI.parse('http://www.example.com/index.html')
req = Net::HTTP::Get.new(uri.request_uri)
req.each_header { |key,value| puts "#{key} = #{value}" }
# => accept-encoding = gzip;q=1.0,deflate;q=0.6,identity;q=0.3
# => accept = */*
# => user-agent = Ruby
//}... -
String
# casecmp(other) -> -1 | 0 | 1 | nil (19.0) -
String#<=> と同様に文字列の順序を比較しますが、 アルファベットの大文字小文字の違いを無視します。
...字列
//emlist[例][ruby]{
"aBcDeF".casecmp("abcde") #=> 1
"aBcDeF".casecmp("abcdef") #=> 0
"aBcDeF".casecmp("abcdefg") #=> -1
"abcdef".casecmp("ABCDEF") #=> 0
//}
nil は文字列のエンコーディングが非互換の時に返されます。
//emlist[][ruby]{
"\u{e4 f6 fc}".enco......de("ISO-8859-1").casecmp("\u{c4 d6 dc}") #=> nil
//}
@see String#<=>, Encoding.compatible?...