betweenFirst static method

String betweenFirst(
  1. String subject,
  2. String from,
  3. String to
)

Returns the smallest portion of subject between from and to.

Implementation

static String betweenFirst(String subject, String from, String to) {
  if (from.isEmpty || to.isEmpty) return subject;
  return before(after(subject, from), to);
}