討論串[問題] 字串比對
共 3 篇文章
首頁
上一頁
1
下一頁
尾頁

推噓3(3推 0噓 22→)留言25則,0人參與, 最新作者sqrt1089 (李崩子)時間8年前 (2015/11/20 17:05), 8年前編輯資訊
1
0
0
內容預覽:
如題. 目前小弟字串比對的方式是. String.IndexOf(UserInput,StringComparison.OrdinalIgnoreCase) >= 0. 這個語法. 譬如:. String = 忠孝東路5段與基隆路交叉口. UserInput = 忠孝東路 or 基隆路。. 都是 t
(還有1071個字)

推噓1(1推 0噓 1→)留言2則,0人參與, 最新作者CrazyAngel (無口系天然呆)時間8年前 (2015/11/21 01:30), 編輯資訊
0
0
0
內容預覽:
string[] UserInput = {"忠孝東路", "基隆路"};. string String = "忠孝東路5段與基隆路交叉口";. var results = Array.FindAll(UserInput, x => String.Contains(x));. if (results
(還有81個字)

推噓0(0推 0噓 0→)留言0則,0人參與, 最新作者bantime (景)時間8年前 (2015/11/22 02:26), 編輯資訊
0
0
0
內容預覽:
不知道有沒有誤解你的意思. string[] addressDatas = new string[0];. string pUserInput = "";. string[] keyWords = pUserInput.Split (' ', ',');. var result = from tar
(還有447個字)
首頁
上一頁
1
下一頁
尾頁