这就是问题所在。我的.txt文件中有一些文本,它看起来完全像这样:
WITH t13 AS (
SELECT Id, Data, [Values]
FROM Table1
UNION ALL
SELECT Id, Data, [Values]
FROM Table3
), cte AS (
SELECT
[Values],
COUNT(*) AS Count2
FROM t13
GROUP BY
[Values]
)
UPDATE t2
SET Counts = cte.Count2
FROM
Table2 t2 JOIN cte ON t2.Fields = cte.[Values];
我需要读取此文件并连接线路的程序。输出(txt.file):
Bee-bee is the voice that Sheep giv-
e. Mou-Mou is the voice that Cow gi-
ve. Miau-Miau is the voice that Ca-
t gives.
我想我需要做这样的事情:
Bee-bee is the voice that Sheep give. Mou-Mou is the voice that Cow give. Miau-Miau is the voice that Cat gives.
这是一个问题,它取代了#Bee; Bee-bee"用" beebee"在输出文件中,这不是我想要的。我需要一些建筑"如果标志是" - "下一个标志是回车,删除" - "但我不知道怎么写这个。
答案 0 :(得分:1)
您从 for (var i = 0; i < box.length; i++) {
(function (i) {
$(box[i] + " " + uiid[i]).click(function () {
var pid = $(this).parent().attr("aria-selected");
if(pid == "true") {
//window.open(urlfirst[i], '_blank');
//window.location.href = urlsecond[i];
alert(urlfirst[i]);
alert(urlsecond[i]);
}
});
})(i); // bring i into scope
}
返回的字符串将转到整行最多换行符。
即
蜜蜂是绵羊的声音 -
所以你需要测试的是最后一个char是readLine
,如果它返回一个子串到那一点。
您可以使用传统的-
和lastIndexOf
或substring
,也可以使用endswith
一个例子是
-$
然后可以将这些子字符串附加到StringBuilder,以便最终得到整个String。