Uint8List _getBoundary()

in lib/src/mime_multipart_transformer.dart [12:24]


Uint8List _getBoundary(String boundary) {
  var charCodes = boundary.codeUnits;

  var boundaryList = Uint8List(4 + charCodes.length);
  // Set-up the matching boundary preceding it with CRLF and two
  // dashes.
  boundaryList[0] = char_code.cr;
  boundaryList[1] = char_code.lf;
  boundaryList[2] = char_code.dash;
  boundaryList[3] = char_code.dash;
  boundaryList.setRange(4, 4 + charCodes.length, charCodes);
  return boundaryList;
}