Explorer

html-ui.part-section

description
type
Fn(text: String, start: String, end: String) -> String
expression
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
      }
  }
visibility
public
html-ui.part-section (project html-ui, branch main, snapshot Daaw3vbJhY15cDW6JsA4JuXvffjj_qFyxoZQMUM8hvQ)
id: ctklHKsZaxMj66lAfBO2NoSIT70lS6l_uCqphPWDDnM
content hash: 7ZiCTvLJbr11PldqOMUBKW6YUKCZKAxMigCOOsU4-Jw