parseHeaderSection method

String? parseHeaderSection(
  1. String header,
  2. String section
)

parse a section from all of header.

parse and get section data in header. header is all of the header string. this function searches a section of section in header, then parses and returns the found data. section's format is

Implementation

String? parseHeaderSection(String header, String section) {
  RegExpMatch? valueMatch =
      RegExp('^$section=(.*?)\$', dotAll: true, multiLine: true)
          .firstMatch(header);
  return valueMatch?.group(1);
}