るりまサーチ

最速Rubyリファレンスマニュアル検索!
126件ヒット [101-126件を表示] (0.065秒)

別のキーワード

  1. openssl cmp
  2. fileutils cmp
  3. bn cmp
  4. name cmp
  5. certificateid cmp

ライブラリ

キーワード

検索結果

<< < 1 2 >>

Symbol#casecmp?(other) -> bool | nil (6101.0)

大文字小文字の違いを無視しシンボルを比較します。 シンボルが一致する場合には true を返し、一致しない場合には false を返します。

...のシンボルを指定します。

//emlist[][ruby]{
:abcdef.casecmp?(:abcde) #=> false
:aBcDeF.casecmp?(:abcdef) #=> true
:abcdef.casecmp?(:abcdefg) #=> false
:abcdef.casecmp?(:ABCDEF) #=> true
:"\u{e4 f6 fc}".casecmp?(:"\u{c4 d6 dc}") #=> true
//}

other がシンボルではない...
...場合や、文字列のエンコーディングが非互換の場合は、nil を返します。

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

@see String#casecmp?, Symbol#casecmp...

OpenSSL::BN#<=>(other) -> -1 | 0 | 1 (2.0)

自身と other を比較し、自身が小さいときには -1、 等しいときには 0、大きいときには 1 を返します。

...new(5) <=> 5 # => 0

OpenSSL::BN.new(5) <=> OpenSSL::BN.new(9) # => -1
OpenSSL::BN.new(5) <=> OpenSSL::BN.new(5) # => 0
OpenSSL::BN.new(5) <=> OpenSSL::BN.new(-5) # => 1
//}

@param other 比較する整数
@raise TypeError 比較できないときに発生します。
@see OpenSSL::BN#ucmp...

OpenSSL::X509::Name#<=>(other) -> -1 | 0 | 1 (2.0)

他の OpenSSL::X509::Name オブジェクトと比較します。

他の OpenSSL::X509::Name オブジェクトと比較します。

自身が other と一致する場合は 0、otherより大きい場合は1、
小さい場合は -1 を返します。

@param other 比較するオブジェクト
<< < 1 2 >>