between static method

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

Returns the portion of subject between from and to.

Implementation

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