list contains implemented
This commit is contained in:
parent
da0709c4db
commit
b638918a89
7 changed files with 36 additions and 9 deletions
|
|
@ -90,10 +90,10 @@ pub fn strcast_callback(ast: &Seg, _syms: &mut SymTable) -> Result<Ctr, String>
|
|||
}
|
||||
}
|
||||
|
||||
pub const CONTAINS_DOCSTRING: &str =
|
||||
pub const SUBSTR_DOCSTRING: &str =
|
||||
"Takes two strings. Returns true if string1 contains at least one instance of string2";
|
||||
|
||||
pub fn contains_callback(ast: &Seg, _syms: &mut SymTable) -> Result<Ctr, String> {
|
||||
pub fn substr_callback(ast: &Seg, _syms: &mut SymTable) -> Result<Ctr, String> {
|
||||
let parent_str: String;
|
||||
if let Ctr::String(ref s) = *ast.car {
|
||||
parent_str = s.to_string();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue