yields True if the beginning of string matches the string pattern patt, and yields False otherwise.


gives a list of the results for each of the stringi.


represents an operator form of StringStartsQ that can be applied to an expression.

Details and Options

  • The string expression patt can contain any of the objects specified in the notes for StringExpression.
  • Setting the option IgnoreCase->True makes StringStartsQ treat lowercase and uppercase letters as equivalent.
  • StringStartsQ[patt][expr] is equivalent to StringStartsQ[expr,patt].
  • StringStartsQ[BioSequence["type","seq"],patt] will check the start of the string "seq" against patt. In this case, degenerate letters in patt are interpreted as wild-card patterns based on the type of bio sequence. Use Verbatim["patt"] to match degenerate letters literally.
  • StringStartsQ has no special behavior for circular sequences, but instead interprets the start of the string as the designated start of the sequence.


open allclose all

Basic Examples  (4)

Check that a string starts with a given prefix:

Give a list of strings as input:

Specify a prefix using a string pattern:

Map the operator form over a list:

Use the operator form to select strings:

Scope  (3)

Check whether a bio sequence starts in a particular sequence:

Bio sequences can start with sequences matching degenerate letters:

Use Verbatim to avoid finding degenerate cases:

Options  (1)

IgnoreCase  (1)

Match a prefix regardless of case:

Wolfram Research (2015), StringStartsQ, Wolfram Language function, (updated 2020).


Wolfram Research (2015), StringStartsQ, Wolfram Language function, (updated 2020).


@misc{reference.wolfram_2020_stringstartsq, author="Wolfram Research", title="{StringStartsQ}", year="2020", howpublished="\url{}", note=[Accessed: 02-March-2021 ]}


@online{reference.wolfram_2020_stringstartsq, organization={Wolfram Research}, title={StringStartsQ}, year={2020}, url={}, note=[Accessed: 02-March-2021 ]}


Wolfram Language. 2015. "StringStartsQ." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2020.


Wolfram Language. (2015). StringStartsQ. Wolfram Language & System Documentation Center. Retrieved from