Rename SQL string::length()
function to string::len()
This commit is contained in:
parent
132354e199
commit
5e2157a0a2
3 changed files with 3 additions and 3 deletions
|
@ -180,7 +180,7 @@ pub fn synchronous(ctx: &Context<'_>, name: &str, args: Vec<Value>) -> Result<Va
|
|||
"string::concat" => 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,
|
||||
|
|
|
@ -22,7 +22,7 @@ pub fn join(args: Vec<Value>) -> Result<Value, Error> {
|
|||
Ok(val.into())
|
||||
}
|
||||
|
||||
pub fn length((string,): (String,)) -> Result<Value, Error> {
|
||||
pub fn len((string,): (String,)) -> Result<Value, Error> {
|
||||
let num = string.chars().count() as i64;
|
||||
Ok(num.into())
|
||||
}
|
||||
|
|
|
@ -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"),
|
||||
|
|
Loading…
Reference in a new issue