#includeint main() { BString str("Hello World!"); str.RemoveAll('o'); printf("%s", str.String()); // Prints "Hell Wrld!" return 0; }
#includeIn this example, the RemoveAll function is used to remove all occurrences of the substring "cr" from the BString object. Both examples use functions from the BString library, which is part of the BeOS operating system.int main() { BString str("Goodbye cruel world"); str.RemoveAll("cr"); printf("%s", str.String()); // Prints "Goodbye uel world" return 0; }