Apparently they are giving me the same output on any input like
"Ruby is red".start_with?("Ruby")
or
"Ruby is red".starts_with?("Ruby")
both are giving the same result.
Before Ruby added String#start_with?
as part of the core library, Rails' Active Support implemented the String#starts_with?
method. Now it's just an alias kept for backwards compatibility.
So yes - they do the same thing, the first one comes from Ruby, the second one - from Rails.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With