diff --git a/lib/src/fnc/mod.rs b/lib/src/fnc/mod.rs index a82c558d..7e6c7f76 100644 --- a/lib/src/fnc/mod.rs +++ b/lib/src/fnc/mod.rs @@ -180,7 +180,7 @@ pub fn synchronous(ctx: &Context<'_>, name: &str, args: Vec) -> Result string::concat, "string::endsWith" => string::ends_with, "string::join" => string::join, - "string::length" => string::length, + "string::len" => string::len, "string::lowercase" => string::lowercase, "string::repeat" => string::repeat, "string::replace" => string::replace, diff --git a/lib/src/fnc/string.rs b/lib/src/fnc/string.rs index 372e4ba2..900bedd4 100644 --- a/lib/src/fnc/string.rs +++ b/lib/src/fnc/string.rs @@ -22,7 +22,7 @@ pub fn join(args: Vec) -> Result { Ok(val.into()) } -pub fn length((string,): (String,)) -> Result { +pub fn len((string,): (String,)) -> Result { let num = string.chars().count() as i64; Ok(num.into()) } diff --git a/lib/src/sql/function.rs b/lib/src/sql/function.rs index dd31ca49..8db997e6 100644 --- a/lib/src/sql/function.rs +++ b/lib/src/sql/function.rs @@ -420,7 +420,7 @@ fn function_string(i: &str) -> IResult<&str, &str> { tag("string::concat"), tag("string::endsWith"), tag("string::join"), - tag("string::length"), + tag("string::len"), tag("string::lowercase"), tag("string::repeat"), tag("string::replace"),