WolframLang: String Functions

By Xah Lee. Date: . Last updated: .

There are about 100 functions on string. This page lists the most useful ones.

Is String

StringQ

return True if argument is string.

StringQ

Length

StringLength

return the count of chars.

StringLength

StringLength["abc"] === 3

Join String

StringJoin[s1, s2]

🔸 SHORT SYNTAX: s1 <> s2

StringJoin

StringJoin["ab", "cd", "e"] === "abcde"

(* short syntax *)
"ab" <> "cd" <> "e" === "abcde"

Get SubString

Insert into string

StringInsert

Insert by position

StringInsert

StringInsert[ "love cat", "I ", 1 ] ===
"I love cat"

Delete substring

StringDrop

Delete parts by position.

StringDrop

StringDelete

Delete parts by Regular Expression .

StringDelete

StringTrim

Remove whitespace at beginning and end.

StringTrim

WolframLang String