blob: 0ac684f6ee42b3fa3d8045332de573e105f74c41 (
plain) (
tree)
|
|
class String
# The inverse of <tt>String#include?</tt>. Returns true if the string
# does not include the other string.
#
# "hello".exclude? "lo" # => false
# "hello".exclude? "ol" # => true
# "hello".exclude? ?h # => false
def exclude?(string)
!include?(string)
end
end
|