fn(text$0, start$1, end$2) =>
let from$3 = @core.string-index-of(text: $0, target: $1, start: 0);
match @core.less-than(left: $3, right: 0) {
true =>
"",
false =>
let begin$4 = @core.plus(left: $3, right: @core.string-length(value: $1));
let found$5 = match @core.equal(left: $2, right: "") {
true =>
@core.string-length(value: $0),
false =>
@core.string-index-of(text: $0, target: $2, start: $4)
};
let section$6 = @core.string-slice(
value: $0,
start: $4,
end: match @core.less-than(left: $5, right: 0) {
true =>
@core.string-length(value: $0),
false =>
$5
}
);
match @core.equal(left: $6, right: "(none)") {
true =>
"",
false =>
$6
}
}