zoukankan
html css js c++ java
用like语句时的C#格式化函数
/**/
///
<summary>
///
对字符串进行sql格式化,并且符合like查询的格式。
///
</summary>
///
<param name="str">
要转换的字符串
</param>
///
<returns>
格式化后的字符串
</returns>
public
static
string
ToLikeSql(
string
sqlstr)
{
if
(sqlstr
==
null
)
return
""
;
StringBuilder str
=
new
StringBuilder(sqlstr);
str.Replace(
"
'
"
,
"
''
"
);
str.Replace(
"
[
"
,
"
[[]
"
);
str.Replace(
"
%
"
,
"
[%]
"
);
str.Replace(
"
_
"
,
"
[_]
"
);
return
str.ToString();
}
在线教学、视频会议(含 文本、语音、视频聊天、电子白板)
查看全文
相关阅读:
HDU 1060 Leftmost Digit
HDU 1008 Elevator
HDU 1042 N!
HDU 1040 As Easy As A+B
HDU 1007 Quoit Design
欧拉函数
HDU 4983 Goffi and GCD
HDU 2588 GCD
HDU 3501 Calculation 2
HDU 4981 Goffi and Median
原文地址:https://www.cnblogs.com/fengwenit/p/805632.html
最新文章
poj 1195(二维树状数组)
利用airbase-ng建立Soft AP
linux软AP--hostapd+dhcpd
7.mongo python 库 pymongo的安装
6.MongoDB4.0在Windows环境的下载、安装、配置
LeetCode OJ:First Missing Positive (第一个丢失的正数)
LeetCode OJ:Missing Number (丢失的数)
条款27:尽量少做转型动作
LeetCode OJ:Combination Sum II (组合之和 II)
LeetCode OJ:Search Insert Position(查找插入位置)
热门文章
LeetCode OJ:Combination Sum (组合之和)
条款25:考虑写出一个不抛出异常的swap函数
条款24:如果所有的参数都需要类型转换,那么请为此采用non-member函数
LeetCode OJ:Palindrome Linked List(回文链表判断)
LeetCode OJ:Valid Palindrome(验证回文)
HDU 1021 Fibonacci Again
HDU 1019 Least Common Multiple
HDU 1012 u Calculate e
HDU 1032 The 3n + 1 problem
HDU 1076 An Easy Task
Copyright © 2011-2022 走看看