flowFind function

void flowFind(
  1. String caller,
  2. String _fs,
  3. int len
)

Find String in out-buffers;

Implementation

void flowFind(String caller, String _fs, int len) {
  print('lllllllllllllllllllllllll  flowList  c: $caller  llllllllllll');
  print(' Seeking: $_fs');
  int foundC = 0;
  List<String> flowList = [];

  ///  Find all "flow-process' Strings
  int bufC = 0;

  ///  type Map in for loop must implement iterable.
  for (var x in out.outBufM.keys) {
    bufC++;
    print('buffer n:o:  $bufC');
    int _lng = x.length;
    print('length: $_lng  ');

    ///  change buffer to String.
    String s = x.toString();
    int current = 0;
    flowList.add(s.substring(6, 42));
    //  while(current < s.length){
    //  Do we have find here?
    int sInd;
    sInd = s.indexOf(_fs, current);
    print('sInd:  $sInd');
    if ((sInd > 0) && ((sInd + len + 1) < s.length)) {
      current = sInd;
      flowList.add(s.substring(current, (current + len)));
      foundC++;
      print('found:  $foundC');
    }
  } //  -----  outBufL
  print('LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL');
  print('FLOW-LIST:');
  flowList.forEach(print);
  print('LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL');
  print('flowList-length: ');
  print(flowList.length);
  print('lllllllllllllllllllllllll  flowList  c: $caller  done lllllllllll');
  // No for Map   if (_betaPB) outBufM.forEach(print); //  Not output for now.
  if (_betaPB)
    out.outBufM.forEach((k, v) => print('$k, $v')); //  Not output for now.
}