るりまサーチ (Ruby 3.2)

最速Rubyリファレンスマニュアル検索!
1件ヒット [1-1件を表示] (0.096秒)
トップページ > クエリ:t[x] > クラス:String[x] > クエリ:encode[x] > クエリ:casecmp?[x] > バージョン:3.2[x]

別のキーワード

  1. string encode
  2. _builtin encode
  3. uri encode_www_form
  4. string encode!
  5. base64 encode64

ライブラリ

検索結果

String#casecmp?(other) -> bool | nil (63622.0)

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

...false
"abcdef".casecmp?("ABCDEF") #=> true
"\u{e4 f6 fc}".casecmp?("\u{c4 d6 dc}") #=> true
//}

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

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

@see String#casecmp...