Tag: 忽略大小写

如何在String.replace中忽略大小写

string sentence = "We know it contains 'camel' word."; // Camel can be in different cases: string s1 = "CAMEL"; string s2 = "CaMEL"; string s3 = "CAMeL"; // … string s4 = "Camel"; // … string s5 = "camel"; 如何用'马'replace'骆驼'尽pipestring.Replace不支持ignoreCase左string?

SQL-在searchstring时忽略大小写

我有一个表中的以下数据 PriceOrderShipped PriceOrderShippedInbound PriceOrderShippedOutbound 在SQL中,我需要编写一个查询来search表中的string。 searchstring时应该忽略大小写。 对于下面提到的SQL查询 SELECT DISTINCT COL_NAME FROM myTable WHERE COL_NAME LIKE '%PriceOrder%' 给出所有上述数据,而 SELECT DISTINCT COL_NAME FROM myTable WHERE COL_NAME LIKE '%Priceorder%' 不给。 例如。 当我search'PriceOrder'或'priceOrder'它的作品,但'priceorder'或'Priceorder'不起作用。 我已经尝试使用COLLATE下面的查询,但它不工作。 请让我知道我哪里错了。 SELECT DISTINCT COL_NAME FROM myTable WHERE COL_NAME COLLATE latin1_general_cs LIKE '%Priceorder%'