Class | String |
In: |
merb-core/lib/merb-core/test/test_ext/string.rb
merb-helpers/lib/merb-helpers/core_ext.rb |
Parent: | Object |
Truncates a string to the given length and appends the given suffix if the string is, in fact, truncated.
"This is a long string right here".truncate(10, "...") #=> "This is..."
# File merb-core/lib/merb-core/test/test_ext/string.rb, line 2 2: def contain?(value) 3: self.include?(value) 4: end
# File merb-core/lib/merb-core/test/test_ext/string.rb, line 8 8: def match?(regex) 9: self.match(regex) 10: end