49件ヒット
[1-49件を表示]
(0.087秒)
種類
- モジュール関数 (33)
- インスタンスメソッド (16)
モジュール
- FileUtils (33)
キーワード
- casecmp? (16)
-
compare
_ file (11) - identical? (11)
検索結果
先頭5件
-
FileUtils
. # cmp(file _ a , file _ b) -> bool (21319.0) -
ファイル file_a と file_b の内容が同じなら真を返します。
...ファイル file_a と file_b の内容が同じなら真を返します。
@param file_a ファイル名。
@param file_b ファイル名。
//emlist[][ruby]{
require 'fileutils'
FileUtils.cmp('somefile', 'somefile') #=> true
FileUtils.cmp('/dev/null', '/dev/urandom') #=> false
//}... -
Symbol
# casecmp?(other) -> bool | nil (9328.0) -
大文字小文字の違いを無視しシンボルを比較します。 シンボルが一致する場合には true を返し、一致しない場合には false を返します。
...には false を返します。
@param other 比較対象のシンボルを指定します。
//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......er がシンボルではない場合や、文字列のエンコーディングが非互換の場合は、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... -
FileUtils
. # compare _ file(file _ a , file _ b) -> bool (9319.0) -
ファイル file_a と file_b の内容が同じなら真を返します。
...ファイル file_a と file_b の内容が同じなら真を返します。
@param file_a ファイル名。
@param file_b ファイル名。
//emlist[][ruby]{
require 'fileutils'
FileUtils.cmp('somefile', 'somefile') #=> true
FileUtils.cmp('/dev/null', '/dev/urandom') #=> false
//}... -
FileUtils
. # identical?(file _ a , file _ b) -> bool (9119.0) -
ファイル file_a と file_b の内容が同じなら真を返します。
...ファイル file_a と file_b の内容が同じなら真を返します。
@param file_a ファイル名。
@param file_b ファイル名。
//emlist[][ruby]{
require 'fileutils'
FileUtils.cmp('somefile', 'somefile') #=> true
FileUtils.cmp('/dev/null', '/dev/urandom') #=> false
//}... -
String
# casecmp?(other) -> bool | nil (6328.0) -
大文字小文字の違いを無視し文字列を比較します。 文字列が一致する場合には true を返し、一致しない場合には false を返します。
...合には false を返します。
@param other self と比較する文字列
//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
//}
nil は文字列のエンコーディングが非互換の時に返されます。
//emlist[][ruby]{
"\u{e4 f6 fc}".encode("ISO-8859-1").casecmp?("\u{c4 d6 dc}") #=> nil
//}
@see String#casecmp...