Skip to content
This repository has been archived by the owner on Oct 6, 2022. It is now read-only.

Latest commit

 

History

History
25 lines (20 loc) · 951 Bytes

TXTReader.new.md

File metadata and controls

25 lines (20 loc) · 951 Bytes

new TXTReader

The constructor function is established to create a TXTReader object for event returning.

Sample

	//The content of the test.txt file is "12345678901234567890"
	var regFieldsDef="(.{5})(.{10})(.{5})";
	var txtReader = new TXTReader("input/test.txt", regFieldsDef, "MS932"); 

API

CallingReturning
new TXTReader (path, regFieldsDef)TXTReader
new TXTReader (path, regFieldsDef, encoding)TXTReader
ParametersTypeDescription
pathStringThe relative file or folder path to the storage.
regFieldsDefStringA regular expression that defines the fields to be fetched.
encodingStringThe charset name of the text file. The default value is UTF-8.