接着我们来看一下要解析字符串时所需要的一些方法,具体代码如下所示:

//要解析的字符串,使用Doom3Tokenizer字符串来初始化变量
private _source : string = " Doom3Tokenizer " ;
private _currIdx : number = 0 ;
//实现公开的接口方法,设置要解析的字符串,并且重置当前索引
public setSource ( source : string ) : void {
    this . _source = source ;
    this . _currIdx = 0 ;
}
//实现公开的接口方法,不改变要解析的字符串,仅重置当前索引
public reset ( ) : void {
    this . _currIdx = 0 ;
}
随风而行之青衫磊落险峰行(www.buleifeng.top) all right reserved,powered by Gitbook本文件修订时间: 2019-10-10 16:27:39

results matching ""

    No results matching ""