Method: REXML::Functions.substring_before
- Defined in:
- lib/rexml/functions.rb
.substring_before(string, test) ⇒ Object
Kouhei fixed this
209 210 211 212 213 214 215 216 217 |
# File 'lib/rexml/functions.rb', line 209 def Functions::substring_before( string, test ) ruby_string = string(string) ruby_index = ruby_string.index(string(test)) if ruby_index.nil? "" else ruby_string[ 0...ruby_index ] end end |