list contains implemented

This commit is contained in:
Ava Apples Affine 2023-03-20 22:03:10 -07:00
parent da0709c4db
commit b638918a89
Signed by: affine
GPG key ID: 3A4645B8CF806069
7 changed files with 36 additions and 9 deletions

View file

@ -68,13 +68,13 @@ pub fn static_stdlib(syms: &mut SymTable) -> Result<(), String> {
);
syms.insert(
"contains".to_string(),
"substr?".to_string(),
Symbol {
name: String::from("contains"),
name: String::from("substr?"),
args: Args::Strict(vec![Type::String, Type::String]),
conditional_branches: false,
docs: strings::CONTAINS_DOCSTRING.to_string(),
value: ValueType::Internal(Rc::new(strings::contains_callback)),
docs: strings::SUBSTR_DOCSTRING.to_string(),
value: ValueType::Internal(Rc::new(strings::substr_callback)),
..Default::default()
},
);