
    eB                     `    d dl mZ d dlmZ d dlmZ dZdZdZ G d de      Z	d	e
d
ee
   fdZy)    )	hasmethod)Matcher)SubstringMatcherzJon ReidzCopyright 2011 hamcrest.orgzBSD, see License.txtc                   6     e Zd Zd fdZdedefdZd Z xZS )StringStartsWithreturnc                 ,    t         t        |   |       y )N)superr   __init__)self	substring	__class__s     H/usr/lib/python3/dist-packages/hamcrest/library/text/stringstartswith.pyr   zStringStartsWith.__init__   s    .y9    itemc                 R    t        |d      sy|j                  | j                        S )N
startswithF)r   r   r   )r   r   s     r   _matcheszStringStartsWith._matches   s"    |,t~~..r   c                      y)Nzstarting with )r   s    r   relationshipzStringStartsWith.relationship   s    r   )r   N)	__name__
__module____qualname__r   strboolr   r   __classcell__)r   s   @r   r   r   
   s     :/S /T /
r   r   r   r   c                     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   s    r   starts_withr      s      I&&r   N)hamcrest.core.helpers.hasmethodr   hamcrest.core.matcherr   &hamcrest.library.text.substringmatcherr   
__author____copyright____license__r   r   r   r   r   r   <module>r&      sA    5 ) C
-$
' 
'3 '73< 'r   