るりまサーチ

最速Rubyリファレンスマニュアル検索!
246件ヒット [201-246件を表示] (0.128秒)
トップページ > クエリ:t[x] > クエリ:Ruby[x] > クラス:String[x] > クエリ:@[x] > 種類:インスタンスメソッド[x] > クエリ:encoding[x]

別のキーワード

  1. openssl t61string
  2. asn1 t61string
  3. t61string new
  4. matrix t
  5. fiddle type_size_t

ライブラリ

キーワード

検索結果

<< < 1 2 3 >>

String#<<(other) -> self (3133.0)

self に文字列 other を破壊的に連結します。 other が 整数である場合は other.chr(self.encoding) 相当の文字を末尾に追加します。

...other を破壊的に連結します。
other が 整数である場合は other.chr(self.encoding) 相当の文字を末尾に追加します。

self を返します。

@
param other 文字列もしくは 0 以上の整数

//emlist[例][ruby]{
str = "string"
str.concat "XXX"
p str # => "str...
...ingXXX"

str << "YYY"
p str # => "stringXXXYYY"

str << 65 # 文字AのASCIIコード
p str # => "stringXXXYYYA"
//}...

String#casecmp(other) -> -1 | 0 | 1 | nil (3132.0)

String#<=> と同様に文字列の順序を比較しますが、 アルファベットの大文字小文字の違いを無視します。

...
String
#<=> と同様に文字列の順序を比較しますが、
アルファベットの大文字小文字の違いを無視します。

このメソッドの動作は組み込み変数 $= には影響されません。


@
param other self と比較する文字列

//emlist[例][ruby]{
"aBcDe...
...=> 0
"aBcDeF".casecmp("abcdefg") #=> -1
"abcdef".casecmp("ABCDEF") #=> 0
//}

nil は文字列のエンコーディングが非互換の時に返されます。

//emlist[][ruby]{
"\u{e4 f6 fc}".encode("ISO-8859-1").casecmp("\u{c4 d6 dc}") #=> nil
//}

@
see String#<=>, Encoding.compatible?...
...
String
#<=> と同様に文字列の順序を比較しますが、
アルファベットの大文字小文字の違いを無視します。

このメソッドの動作は組み込み変数 $= には影響されません。

String
#casecmp? と違って大文字小文字の違いを無視するの...
...
Unicode 全体ではなく、A-Z/a-z だけです。

@
param other self と比較する文字列

//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}".encode("ISO-8859-1").casecmp("\u{c4 d6 dc}") #=> nil
//}

@
see String#<=>, Encoding.compatible?...

String#<<(other) -> self (3130.0)

self に文字列 other を破壊的に連結します。 other が 整数である場合は other.chr(self.encoding) 相当の文字を末尾に追加します。

...other を破壊的に連結します。
other が 整数である場合は other.chr(self.encoding) 相当の文字を末尾に追加します。

self を返します。

@
param other 文字列もしくは 0 以上の整数

//emlist[例][ruby]{
str = "string"
str.concat "XXX"
p str # => "str...
...ingXXX"

str << "YYY"
p str # => "stringXXXYYY"

str << 65 # 文字AのASCIIコード
p str # => "stringXXXYYYA"
//}...

String#unicode_normalized?(form = :nfc) -> bool (3044.0)

self が引数 form で指定された正規化形式で Unicode 正規化された文字列か どうかを返します。

...規化された文字列か
どうかを返します。

@
param form 正規化形式を :nfc、:nfd、:nfkc、:nfkd のいずれかで指定しま
す。省略した場合は :nfc になります。

@
raise Encoding::CompatibilityError self が Unicode 文字列ではない場合...
...に発生します。

//emlist[例][ruby]{
"a\u0300".unicode_normalized? # => false
"a\u0300".unicode_normalized?(:nfd) # => 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!...

String#unicode_normalize!(form = :nfc) -> self (3032.0)

self を NFC、NFD、NFKC、NFKD のいずれかの正規化形式で Unicode 正規化し た文字列に置き換えます。

...変換が行なわれなくても self を返します。

@
param form 正規化形式を :nfc、:nfd、:nfkc、:nfkd のいずれかで指定しま
す。省略した場合は :nfc になります。

@
raise Encoding::CompatibilityError self が Unicode 文字列ではない場合...
...に発生します。

//emlist[例][ruby]{
t
ext = "a\u0300"
t
ext.unicode_normalize!(:nfc)
t
ext == "\u00E0" # => true
t
ext.unicode_normalize!(:nfd)
t
ext == "a\u0300" # => true
//}

@
see String#unicode_normalize, String#unicode_normalized?...

絞り込み条件を変える

<< < 1 2 3 >>