String replace function that supports replacing a specific instance with case insensitivity
public static string ReplaceStringInstance(string origString, string findString, string replaceWith, int instance, bool caseInsensitive)
Return Value
updated string or original string if no matches
Parameters
origString
Original input string
findString
The string that is to be replaced
replaceWith
The replacement string
instance
Instance of the FindString that is to be found. 1 based. If Instance = -1 all are replaced
caseInsensitive
Case insensitivity flag
See also:
Class StringUtils© West Wind Technologies, 1996-2024 • Updated: 06/29/24
Comment or report problem with topic