read_file(3) MudOS v21c2 (5
Sep 1994)
名稱:
read_file() - 把一個檔案的內容讀進一個字串變數裡.
語法:
string read_file( string file, int start_line, int number_of_lines
);
字串 read_file( 字串 file, 整數 start_line, 整數 number_of_lines );
用法:
從一個檔案中讀入幾行文字到一個字串中. 第二個和第三個參數可以選擇.
如果只指定 file 的參數, 整個檔案都會被讀進一個字串中. start_line 是指定你要從檔案的第幾行開始讀取.
如果你指定的行數超過檔案的尾端或是指定的數字為負數, 則會傳回 0.
參考:
翻譯:
Spock @ FF 97.May.24. (printed 3/16/95)
回到上一頁