U
    òÀMfB  ã                   @   sX   d dl mZ d dlmZ d dlmZ dZdZdZG dd„ deƒZ	e
ee
 d	œd
d„ZdS )é    )Ú	hasmethod)ÚMatcher)ÚSubstringMatcherzJon ReidzCopyright 2011 hamcrest.orgzBSD, see License.txtc                       s:   e Zd Zddœ‡ fdd„Zeedœdd„Zdd	„ Z‡  ZS )
ÚStringStartsWithN)Úreturnc                    s   t t| ƒ |¡ d S )N)Úsuperr   Ú__init__)ÚselfÚ	substring©Ú	__class__© úJ/tmp/pip-unpacked-wheel-97nlcpo6/hamcrest/library/text/stringstartswith.pyr      s    zStringStartsWith.__init__)Úitemr   c                 C   s   t |dƒsdS | | j¡S )NÚ
startswithF)r   r   r
   )r	   r   r   r   r   Ú_matches   s    
zStringStartsWith._matchesc                 C   s   dS )Nzstarting withr   )r	   r   r   r   Úrelationship   s    zStringStartsWith.relationship)	Ú__name__Ú
__module__Ú__qualname__r   ÚstrÚboolr   r   Ú__classcell__r   r   r   r   r   
   s   r   )r
   r   c                 C   s   t | ƒS )a^  Matches if object is a string starting with a given string.

    :param string: The string to search for.

    This matcher first checks whether the evaluated object is a string. If so,
    it checks if ``string`` matches the beginning characters of the evaluated
    object.

    Example::

        starts_with("foo")

    will match "foobar".

    )r   )r
   r   r   r   Ústarts_with   s    r   N)Zhamcrest.core.helpers.hasmethodr   Zhamcrest.core.matcherr   Z&hamcrest.library.text.substringmatcherr   Ú
__author__Ú__copyright__Ú__license__r   r   r   r   r   r   r   Ú<module>   s   