def string_to_boolean(string):
    """
  Return True if the value of the "string" parameter can be parsed as True.
  Return False if the value of the "string" parameter can be parsed as False.
  Otherwise, Raise.

  The parser is completely arbitrary, see code for actual implementation.
  """
    try:
        return ('false', 'true').index(string.lower())
    except Exception:
        raise ValueError('%s is neither True nor False.' % string)
