WLJS LogoWLJS Notebook

StringQ

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

Examples

Test for strings:

StringQ["hello"]
(* True *)
StringQ[hello]
(* False *)

Filter strings from a list:

Select[{1, "a", 2, "b"}, StringQ]
(* {"a", "b"} *)

Please visit the official Wolfram Language Reference for more details.

On this page