StringQ

StringQ[expr]

gives True if expr is a string, and False otherwise.

Examples

open allclose all

Basic Examples  (2)

Test whether "123" is a string:

Pick out all strings in a list:

Scope  (2)

StringQ works on strings with internal formatting:

StringQ works on any sequence of ordinary and special characters:

Properties & Relations  (3)

All strings have head String:

Use ToString to convert an expression to a string:

Use StringMatchQ to test whether a string pattern matches a particular string:

Wolfram Research (1991), StringQ, Wolfram Language function, https://reference.wolfram.com/language/ref/StringQ.html.

Text

Wolfram Research (1991), StringQ, Wolfram Language function, https://reference.wolfram.com/language/ref/StringQ.html.

CMS

Wolfram Language. 1991. "StringQ." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/StringQ.html.

APA

Wolfram Language. (1991). StringQ. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/StringQ.html

BibTeX

@misc{reference.wolfram_2024_stringq, author="Wolfram Research", title="{StringQ}", year="1991", howpublished="\url{https://reference.wolfram.com/language/ref/StringQ.html}", note=[Accessed: 21-December-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_stringq, organization={Wolfram Research}, title={StringQ}, year={1991}, url={https://reference.wolfram.com/language/ref/StringQ.html}, note=[Accessed: 21-December-2024 ]}