stardict字典檔案格式識別類

2021-04-17 01:45:04 字數 1642 閱讀 7272

using

system;

using

system.collections.generic;

using

system.io;

using

system.linq;

using

system.text;

namespace

cn.laiyunqing

public

list

<

string

>

words(

string

key)

catch

(endofstreamexception)

if(ch[index -1

] ==

end)

string

querystring 

=encoding.utf8.getstring(word);

if(querystring.startswith(key, 

true

, system.globalization.cultureinfo.currentculture))}}

bridx.close();

fsidx.close();

return

words;

}public

string

result(

string

originaltext)

catch

(endofstreamexception)

if(ch[index -1

] ==

end)

string

querystring 

=encoding.utf8.getstring(word);

index =0

;byte

tmp 

=bridx.readbytes(4);

pos 

=tmp[3] 

+(tmp[2] 

<<8) 

+(tmp[1] 

<<

16) 

+(tmp[0] 

<<

24); 

tmp 

=bridx.readbytes(4);

size 

=tmp[3] 

+(tmp[2] 

<<8) 

+(tmp[1] 

<<

16) 

+(tmp[0] 

<<

24); 

byte

content 

=brdict.readbytes(size);

string

outtext 

=encoding.utf8.getstring(content).replace(""

, "") +"

";//是查詢的單詞

if(querystring 

==originaltext)}}

brdict.close();

fsdict.close();

bridx.close();

fsidx.close();

return

translatedtext;}}

}

Oracle 控制檔案格式ctl檔案格式

options skip 1,errors 10 load data characterset zhs16gbk infile into table table name truncate fields terminated by optionally enclosed by trailing nu...

檔案格式 gff格式

gff檔案格式 gff格式是 sanger 研究所定義,是一種簡單的 方便的對於 dna rna以及蛋白質序列的特徵進行描述的一種資料格式,已經成為序列注釋的通用格式,比如基因組的基因 許多軟體都支援輸入或者輸出gff格式。前格式定義的最新版本是版本3。原始定義見 song websitegff是存...

DOS檔案格式 與 UNIX檔案格式 轉換

這裡闡述兩種方法 1.使用vim的方法 在vim下 使用如下命令 set fileformat unix 就可轉換成 unix 檔案格式,也可使用其縮寫形式命令 set ff unix 直接輸入命令 set fileformat 或 set ff 還可查詢當前的命令格式。2.使用linux命令工具 ...