# fn() startsWith
Check whether a string is a prefix of another string.

Defined in | <seqan/sequence.h>
Signature | `bool startsWith(str, prefix);`

## Parameters

`str` | The string to check (A SegmentableConcept).
`prefix` | The prefix to check for (A ContainerConcept).

## Return Values

`bool` | `true` if `prefix` is a prefix of `str`.

## Data Races

If not stated otherwise, concurrent invocation is not guaranteed to be thread-safe.

#### Dox Sources

    /*!
     * @fn startsWith
     *
     * @headerfile <seqan/sequence.h>
     *
     * @brief Check whether a string is a prefix of another string.
     *
     * @signature bool startsWith(str, prefix);
     *
     * @param[in] str The string to check (A @link SegmentableConcept @endlink).
     * @param[in] prefix The prefix to check for (A @link ContainerConcept
     *                   @endlink).
     *
     * @return bool <tt>true</tt> if <tt>prefix</tt> is a prefix of <tt>str</tt>.
     */