-
Completed at: 2023-01-09T04:41:31.637Z
-
Completed languages: ruby
-
Tags: Strings, Fundamentals
-
Rank: 7 kyu
Complete the solution so that it returns true if the first argument(string) passed in ends with the 2nd argument (also a string).
Examples:
solution('abc', 'bc') // returns true
solution('abc', 'd') // returns falsesolution('abc', 'bc') # returns true
solution('abc', 'd') # returns falsesolution('abc', 'bc') # returns true
solution('abc', 'd') # returns falsesolution("abc", "bc") // returns true
solution("abc", "d") // returns falsesolution("abc", "bc"). % match
\+ solution("abc", "d"). % no match(solution "abc" "bc") ; returns true
(solution "abc" "d'" ; returns falsestrEndsWith('abc', 'bc') -- returns true
strEndsWith('abc', 'd') -- returns false StringEndsWith('abc', 'bc')
* --> result = 1
StringEndsWith('abc', 'd')
* --> result = 0solution("abc", "bc") // returns true
solution("abc", "d") //returns false