Functions that convert between Rye value types.
Pure Builtin(1): Tries to change a Rye value to a word with same name.
{ "a" "1" } .dict .validate { a: required }
; returns [
; a: "1"
; ]
{ "a" "1" } .dict .validate { a: required integer }
; returns [
; a: 1
; ]
{ "a" "1" } .dict .validate { b: required } |disarm |type?
; returns error
{ "a" "1" } .dict .validate { b: optional "B" }
; returns [
; b: "B"
; ]
Pure Builtin(1): Tries to change a Rye value to a word with same name.
{ "a" "1" } .dict .validate { a: required }
; returns [
; a: "1"
; ]
{ "a" "1" } .dict .validate { a: required string }
; returns [
; a: "1"
; ]
{ "a" "1" } .dict .validate { a: required integer }
; returns [
; a: 1
; ]
{ "a" "1.0" } .dict .validate { a: required decimal }
; returns [
; a: 1.000000
; ]
{ "e" "rye@ryelang.org" } .dict .validate { e: required email }
; returns [
; e: "rye@ryelang.org"
; ]
{ } .dict .validate { b: optional "1" integer }
; returns [
; b: 1
; ]
{ } .dict .validate { b: optional "2" decimal }
; returns [
; b: 2.000000
; ]
Pure Builtin(1): Tries to change a Rye value to a word with same name.
{ "a" "AAA" } .dict .validate { a: required integer calc { + 1 } } |disarm |type?
; returns error
{ "a" "100" } .dict .validate { a: required integer calc { + 1 } }
; returns [
; a: 101
; ]
Functions for handling and working with Context.
Builtin(1): TODODOC
regexp "[0-9]" |type?
; returns native
regexp "[0-9]" |is-match "5"
; returns 1
regexp "[0-9]" |is-match "a"
; returns 0
regexp "[0-9]+c+" |match? "aa33bb55cc"
; returns "55cc"
regexp "([0-9]+)" |submatch? "aa33bb44cc"
; returns "33"
regexp "([0-9]+).*?(c+)" |submatches? "aa33bb55cc"
; returns { "33" "cc" }
regexp "([0-9]+)" |find-all "aa33bb55cc"
; returns { "33" "55" }
regexp "([0-9]+)" |replace-all "aa33bb55cc" "XX"
; returns "aaXXbbXXcc"