Determines search direction for string operations.
Search from the start, moving forward through the string.
Search from the end, moving backward through the string.