查看网站首页
查看网站首页
查看 sitemap.xml
✏️ 正在编辑: %3c%3d%3e-i.yaml
路径:
/opt/alt/ruby18/share/ri/1.8/system/String/%3c%3d%3e-i.yaml
提示:
您可以编辑任何文件(包括二进制文件),但请注意不当修改可能导致文件损坏。
--- !ruby/object:RI::MethodDescription aliases: [] block_params: comment: - !ruby/struct:SM::Flow::P body: Comparison---Returns -1 if <em>other_str</em> is less than, 0 if <em>other_str</em> is equal to, and +1 if <em>other_str</em> is greater than <em>str</em>. If the strings are of different lengths, and the strings are equal when compared up to the shortest length, then the longer string is considered greater than the shorter one. If the variable <tt>$=</tt> is <tt>false</tt>, the comparison is based on comparing the binary values of each character in the string. In older versions of Ruby, setting <tt>$=</tt> allowed case-insensitive comparisons; this is now deprecated in favor of using <tt>String#casecmp</tt>. - !ruby/struct:SM::Flow::P body: <tt><=></tt> is the basis for the methods <tt><</tt>, <tt><=</tt>, <tt>></tt>, <tt>>=</tt>, and <tt>between?</tt>, included from module <tt>Comparable</tt>. The method <tt>String#==</tt> does not use <tt>Comparable#==</tt>. - !ruby/struct:SM::Flow::VERB body: " "abcdef" <=> "abcde" #=> 1\n "abcdef" <=> "abcdef" #=> 0\n "abcdef" <=> "abcdefg" #=> -1\n "abcdef" <=> "ABCDEF" #=> 1\n" full_name: String#<=> is_singleton: false name: <=> params: | str <=> other_str => -1, 0, +1 visibility: public
💾 保存文件
← 返回文件管理器