Improved TextUtil with binarySearch methods (from attoparser)