Skip to content

dos_strreplace

Dale Fugier edited this page Jul 1, 2026 · 1 revision

Replaces indicated characters with other characters in a string.

Syntax

(dos_strreplace string oldchars newchars [T])

Parameters

string

A string.

oldchars

The character to be replaced by newchars.

newchars

The character replacing oldchars.

T

If specified as T, a case insensitive replacement is performed. Otherwise, a case sensitive replacement is performed.

Returns

The modified string if successful.

nil on error.

Example

Command: (setq str "Everybody likes ice hockey.")
"Everybody likes ice hockey."

Command: (dos_strreplace str "hockey" "golf")
"Everybody likes ice golf."

Clone this wiki locally