init static method

void init({
  1. required String title,
  2. required bool isDebug,
  3. required int limitLength,
})

Implementation

static void init({required String title, required bool isDebug,required int limitLength}) {
  _title = title;
  _isDebug = isDebug;
  _limitLength = limitLength;
  _startLine = "$_split$_title$_split";
  var endLineStr = StringBuffer();
  var cnCharReg = RegExp("[\u4e00-\u9fa5]");
  for (int i = 0; i < _startLine.length; i++) {
    if (cnCharReg.stringMatch(_startLine[i]) != null) {
      endLineStr.write(_separator);
    }
    endLineStr.write(_separator);
  }
  _endLine = endLineStr.toString();
}