Module: JamfRubyExtensions::String::BackPorts
- Included in:
- String
- Defined in:
- lib/jamf/ruby_extensions/string/backports.rb
Instance Method Summary collapse
- #casecmp?(other) ⇒ Boolean
- #delete_prefix(pfx) ⇒ Object
- #delete_prefix!(pfx) ⇒ Object
- #delete_suffix(sfx) ⇒ Object
- #delete_suffix!(sfx) ⇒ Object
Instance Method Details
#casecmp?(other) ⇒ Boolean
54 55 56 57 58 |
# File 'lib/jamf/ruby_extensions/string/backports.rb', line 54 def casecmp?(other) return nil unless other.is_a? String casecmp(other).zero? end |
#delete_prefix(pfx) ⇒ Object
33 34 35 |
# File 'lib/jamf/ruby_extensions/string/backports.rb', line 33 def delete_prefix(pfx) sub /\A#{pfx}/, Jamf::BLANK end |
#delete_prefix!(pfx) ⇒ Object
37 38 39 |
# File 'lib/jamf/ruby_extensions/string/backports.rb', line 37 def delete_prefix!(pfx) sub! /\A#{pfx}/, Jamf::BLANK end |