← Back
Editing: stringstartswith.cpython-38.pyc
U �b�V� � @ s@ d Z dZdZddlmZ ddlmZ G dd� de�Zdd � Zd S )zJon ReidzCopyright 2011 hamcrest.orgzBSD, see License.txt� )�SubstringMatcher)� hasmethodc s, e Zd Z� fdd�Zdd� Zdd� Z� ZS )�StringStartsWithc s t t| ��|� d S )N)�superr �__init__)�self� substring�� __class__� �H/usr/lib/python3/dist-packages/hamcrest/library/text/stringstartswith.pyr s zStringStartsWith.__init__c C s t |d�sdS |�| j�S )N� startswithF)r r r )r �itemr r r �_matches s zStringStartsWith._matchesc C s dS )Nz starting withr )r r r r �relationship s zStringStartsWith.relationship)�__name__� __module__�__qualname__r r r � __classcell__r r r r r s 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) � __author__Z __copyright__Z__license__Z&hamcrest.library.text.substringmatcherr Zhamcrest.core.helpers.hasmethodr r r r r r r �<module> s
Save File
Cancel