Answers for "make string case insensitive c#"

C#
1

c# replace string case insensitive

class Program
{
    static void Main()
    {
        string input = "hello WoRlD";
        string result = 
           Regex.Replace(input, "world", "csharp", RegexOptions.IgnoreCase);
        Console.WriteLine(result); // prints "hello csharp"
    }
}
Posted by: Guest on March-29-2020
0

c# Case insensitive Contains(string)

// To test if the string paragraph contains the string word
culture.CompareInfo.IndexOf(paragraph, word, CompareOptions.IgnoreCase) >= 0
Posted by: Guest on July-01-2021

Code answers related to "make string case insensitive c#"

C# Answers by Framework

Browse Popular Code Answers by Language