Explorer

std.string-contains-from

description
Whether pattern appears in value at index or later
type
Fn(value: String, pattern: String, index: Number) -> Boolean
expression
fn(value$0, pattern$1, index$2) =>
  let end$3 = @core.plus(left: $2, right: @core.string-length(value: $1));
  match @core.greater-than(left: $3, right: @core.string-length(value: $0)) {
    true =>
      false,
    false =>
      match @core.equal(left: @core.string-slice(value: $0, start: $2, end: $3), right: $1) {
        true =>
          true,
        false =>
          @std.string-contains-from(value: $0, pattern: $1, index: @core.plus(left: $2, right: 1))
      }
  }
visibility
public
std.string-contains-from (project definy, branch accept-new-accounts, snapshot XoN1SzeSljKEq7A884S1VlWxMBcoS3Syt0cee07GVH0)
id: Het_DXnoHEQNkM7bviP4NreBUG4pGo1NFkOkrTRhqz4
content hash: AsL20UmNBxStKt0t-Vo83xPwmFcZ6d3JURI5JQSDb9A