<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def hasOption(self, name):
 """ Check whether this CLI has an option with a given name. :param name: the name of the option to check; can be short or long name. :return: true if an option exists in the UI for the given name """

    name = name.strip()
    for o in self.options:
      if o.short == name or o.long == name:
        return True
    return False