Ensure string::words SQL function handles multiple spaces correctly (#72)

This commit is contained in:
Finn Bear 2022-08-28 18:46:15 -07:00 committed by GitHub
parent f8535b0546
commit 42d8260966
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -81,5 +81,5 @@ pub fn uppercase(_: &Context, mut args: Vec<Value>) -> Result<Value, Error> {
}
pub fn words(_: &Context, mut args: Vec<Value>) -> Result<Value, Error> {
Ok(args.remove(0).as_string().split(' ').collect::<Vec<&str>>().into())
Ok(args.remove(0).as_string().split_whitespace().collect::<Vec<&str>>().into())
}