- Introduction
- License
- History
- Compilation & Hosting
- Configuration File
- Modules:
- FAQ
- Links
- Credits
|
Declaration:
-
function substr_ireplace(const str, sub, repl: string): string;
Arguments:
-
str |
Source string |
sub |
Substring to search for |
repl |
Replacement |
Description:
-
This function finds all occurrences of sub in str and replaces them with repl. This function is case insensitive.
Returns:
-
Replacement result string or original one depending on search success.
Usage:
-
s := 'I like Apples much more than Oranges';
s := substr_ireplace(s, 'apples', 'bananas');
s := substr_ireplace(s, 'oranges', 'potatoes');
writeln(s);
See also:
-
substr_replace.
|