一.說一下下面幾個東西的區別:
\r:ascii碼表中的13號,表示游標移向最左側
在windows中,回車是\r\n
在unix和liunx中,回車是\n
因此,如果在window下對csv檔案進行按行分割,那麼就是:字串.split(new string , stringsplitoptions.removeemptyentries);//按行分割
測試如下:
分析:雖然2和3的效果看起來是一樣的,但是2確實比3少了乙個\r。分析一下4,先輸出abcd\r,此時游標移到開頭,然後輸出abcd,覆蓋了原來的。using system;
using system.collections.generic;
using system.linq;
using system.text;
, stringsplitoptions.removeemptyentries);
console.write(s2[0]);
console.write("abcd");
console.write(s2[0].equals("abcd"));
console.read();}}
}
二.陣列和字典的值複製
using system;
using system.collections.generic;
using system.linq;
using system.text;
; int b = new int[a.length];
array.copy(a, b, a.length);
//輸出1234
for (int i = 0; i < b.length; i++)
a[0] = 11; a[1] = 22; a[2] = 33; a[3] = 44;
//輸出1234
for (int i = 0; i < b.length; i++)
console.writeline();
//2.字典值複製
dictionaryc = new dictionary();
c.add("a", 100);
c.add("b", 200);
dictionaryd = new dictionary(c);
//輸出key = 100, value = 200
foreach (var item in d)
, value = ", item.key, item.value);
}c["a"] = 300;
c["b"] = 400;
//輸出key = 100, value = 200
三.轉換工具說明
優點:1.支援中文
2.純c#編寫,修改起來很方便
缺點:1.只能匯出c#類和二進位制檔案
四.excel相關
2.顯示所有批註:審閱 / 顯示所有批註
注釋轉換工具
專案原始碼 專案簡介 實現對乙個c c 語言程式原始檔中注釋的轉換功能。開發環境 linux windows,c vs,vim,g gdb,make 主要技術 狀態機,繼承多型 實現思路 注釋轉換工具使用的主要的技術是狀態機,通過對輸入的檔案流中的每個字元讀取識別然後進入不同的狀態進行處理,最終實現...
資料轉換工具 》
pdi kettle 是什麼?pdi kettle 是一款開源的 元資料驅動的 etl 資料的抽取 轉換 載入 工具,是開源 etl 工具裡功能比較強大的乙個。pdi 的全稱是pentaho data integeration,kettle 是 pdi 以前的名稱,kettle 本意是水壺的意思,表...
Array轉換工具
public class arraytransitionutils param contennt param separator 自定義分割符 return string description 去掉字元轉分割符的最後乙個符號,如 10 20 30 10 20 30 public static st...