Another delimiter function without substring or indexOf methods, suggested by Tyler Morgan.