Explorer

markdown.is-digits

description
Whether text has only the digits 0 to 9 (true for an empty text)
type
Fn(text: String) -> Boolean
expression
fn(text$0) =>
  @core.equal(
    left: @core.string-replace(
      text: @core.string-replace(
        text: @core.string-replace(
          text: @core.string-replace(
            text: @core.string-replace(
              text: @core.string-replace(
                text: @core.string-replace(
                  text: @core.string-replace(
                    text: @core.string-replace(text: @core.string-replace(text: $0, from: "0", to: ""), from: "1", to: ""),
                    from: "2",
                    to: ""
                  ),
                  from: "3",
                  to: ""
                ),
                from: "4",
                to: ""
              ),
              from: "5",
              to: ""
            ),
            from: "6",
            to: ""
          ),
          from: "7",
          to: ""
        ),
        from: "8",
        to: ""
      ),
      from: "9",
      to: ""
    ),
    right: ""
  )
visibility
public
markdown.is-digits (project markdown, branch main, snapshot A_DQB42norQipCLzT0TSP-ZbZiC-EXHKoYK6tAFWTC0)
id: nFgHN3Yq6KF7tD2eouUKHPTShguTYv2Hy4IURgIFij8
content hash: ByuzDi67UoMN_nzkg4MlepZ56hv3VTNsx7-boZF3bwc