Skip to content

Modern String RemoveChars

Paul Squires edited this page Oct 19, 2026 · 5 revisions

Home › String Library › String Library › RemoveChars

RemoveChars

Removes every character that belongs to a set.

Syntax

RemoveChars( s, chars [, ic] )

Notes

  • O(n*k)

Examples

#import "std/strings"
using strings

print RemoveChars( "abacadabra", "bac" )      '' dr
print RemoveChars( "(555) 123-4567", "() -" )    '' 5551234567
print RemoveChars( "abacadabra", "" )         '' abacadabra -- an empty set deletes nothing

Library: String Library
Category: String Library
Documented under: The Functions

Clone this wiki locally