strReplaceLit

fnSeries strReplaceLit(Series s, string from, string to)

Replaces every occurrence of the literal from with to (ADR-2026-10-30-01): a left-to-right non-overlapping scan; the replacement text is never rescanned (Python str.replace / np.char.replace semantics, not Polars' first-only default); an empty replacement deletes; a missing needle leaves the string unchanged; null strings stay null.

Parameters

sthe STRING Series
fromthe literal needle (non-empty)
tothe literal replacement

Returns

the replaced STRING Series.

Throws

DataFrameException on an empty needle.