Fix ends_with functions that were wrongly replaced with '/'

During the last commit bf736ad6, two `ends_with()` functions were wrongly replaced with `'/'` while replacing `DS`.